* Noun: When referring to a unit of distance, "miles" is a noun.
* Example: "We drove for many miles."
* Adjective: "Miles" can be used as an adjective, usually in a plural form, to describe something that is long or extended in distance.
* Example: "We took a miles-long walk."
* Adverb: While less common, "miles" can act as an adverb to describe something that happens at a great distance.
* Example: "They live miles away."
So, to determine the part of speech, you need to look at how it's used in the sentence.