Can you please tell me what part of speech is the word marshmallow in the following sentence? "We made marshmallow snowmen in class."

as used here, marshmallow functions as an adjective, modifying the noun (direct object) "snowmen."

Much to the consternation of foreign students learning English, nouns are often used as adjectives.

And of course, there is the rule that "any noun can be verbed."