* Noun: This is the most common use. "I put my clothes in the closet."
* Adjective: This is less common, but possible. "The closet door was painted a bright shade of red."
* Verb: This is even less common but still possible. "He closetted himself in his room to work."
Let me know the sentence you're working with, and I can tell you the specific part of speech for "closet" in that context.