Noun: When referring to the geographical feature, it's a noun.
* Example: "We hiked through a beautiful valley."
Adjective: When used to describe something as being like a valley, it's an adjective.
* Example: "The valley floor was covered in a thick fog."