* Adjective: Describing something that is allowed or valid according to the law.
* Example: "It is legal to vote in the United States."
* Noun: The law or laws in general.
* Example: "They studied the legal ramifications of their actions."
* Adverb: In a way that is according to the law.
* Example: "The contract was legally binding."
So, to determine the correct part of speech, you need to look at how the word is used in the sentence.