* Adjective: When it modifies a noun, describing how many. Example: "Sixteen candles were on the cake."
* Noun: When it refers to the number itself. Example: "Sixteen is my favorite number."
The part of speech depends on how it's used in the sentence.