Substitute teacher is an adjective and a noun, where substitute is an adjective as defined in the dictionary. However, what about replacement teacher? Replacement is defined as a noun in the dictionary. Does that make replacement teacher a compound noun or is replacement in this situation an adjective nevertheless?
Substitute is indeed a noun:
substitute n.: One that takes the place of another; a replacement.
As @EdwinAshworth points out, it is also an adjective:
being such in appearance only and made with or manufactured from usually cheaper materials; synonym: artificial - MW
Regardless of the label, it functions as an adjective in the pair substitute teacher.
Replacement is a noun, and means substitute as well. This is a case of a noun acting as an adjective. Replacement teacher is exactly the same as substitute teacher. Does it retain its essential property as a noun when used as an adjective?
According to Grammar Monster, most compound nouns are made up of two nouns or an adjective and a noun. For example:
Noun + Noun: Bath tub, witchcraft, seaman, wall-paper
Adjective + Noun: Hardware, highway, full moon, whiteboard
Other sites define it similarly, or restrict it to two nouns. Edufind Is even looser, stating it's a noun plus another word and gives examples:
noun + noun: bedroom
noun + verb: rainfall, haircut
noun + adverb: hanger-on, passer-by
verb + noun: washing machine, driving licence
verb + adverb: lookout, drawback
adjective + noun: greenhouse, software
adjective + verb: dry-cleaning, public speaking
adverb + noun: onlooker, bystander
adverb + verb: output, upturn, input
But this we do know: technically, Adj. + Noun => compound noun. And, noun + noun => compound noun. So, I think that is what the comments above are about. Labels may complicate things. There are lots of labels for the same thing. You do not need to know all the labels to learn, write, and speak English.
A substitute teacher is the same as a replacement teacher. Until the replacement becomes permanent. In this economy, both are a blessing.
Edited to reflect information in comment.