* Adjective: Describing a noun, like "The room was messy."
* Noun: Referring to the state of being messy, like "The room was in a mess."
* Verb: To make something messy, like "The children messed up the kitchen."
So, to know the exact part of speech, you need to see the sentence it's used in.