Let's break it down:
* In: This is a preposition, which connects a noun or pronoun to other words in the sentence.
* an: This is an article, modifying the noun "environment."
* environment: This is a noun.
Together, these words form a prepositional phrase that acts as an adverbial phrase. This means it modifies a verb, adjective, or another adverb, telling us where something happens, exists, or occurs.
For example:
* "The plants thrive in an environment with plenty of sunlight." (modifies the verb "thrive")
* "The animals are happiest in an environment that feels natural." (modifies the adjective "happiest")
So, while "environment" itself is a noun, the entire phrase "in an environment" functions as a prepositional phrase acting as an adverb.