Subjunctive and Imperative are two moods in Spanish.
Imperative is a command (and in English, there is an implied subject) - Clean your room, Wash the car, Don't eat the chicken, Don't forget to lock the door.
In Spanish, the Imperative often looks a lot like the subjunctive except in the positive tú form. (It is important to note that it can make a difference in the conjugation if the command is positive (Clean your room, wash the car) or negative (don't eat the chicken, don't forget to lock the door)).
For positive (affirmative) tú commands, use the 3rd person singular ending - Limpia tu habitación
For negative tú commands, use the subjunctive 2nd person singular - No comas el pollo
Here is a link for how to form the other Imperative Commands.
Subjunctive mood is used to express desires, dreams, doubts, the unknown, and emotions. It usually contains one subject in the first part of the sentences in the indicative form, and a different subject in the second part of the sentence in the subjunctive.
Mi sueño es [Indicative] que ellos vivan hasta que tengan setenta años [subjunctive].
Quiero [Indicative] que ella me escriba [subjunctive]
Basically, subjunctive and imperative while they use the same conjugation for the verb, are different types of sentences. You should be able to tell which sentence they are by context and looking to see if the sentence is telling someone to do something or is expressing a wish, desire, dream, etc.
superb answer, thank you.
As usual, it's context... you wouldn't say "I hope that CLEAN YOUR ROOM!"... it's the linking words and tone of voice that tell you whether the conjugation is subjunctive or imperative. I love Duolingo, but if there's one area were it really falls down it's lack of context. I think that for situations like this, it's actually much easier to interpret real sentences than the snippets that crop up here.