Subjuntive in Spanish is used for incertain or contrary-to-facts situations, most often in the English form were from the ver to be or auxiliary words may, might, and should.
1. A noun clause in which it has the same function as a noun that can be the subject or the object of a sentence.
ex: El hecho que Javier no esté (la ausencia de Javier) me molesta.
ex: Quiero que corras conmigo.
2. An adjective or relative clause has the same function as an adjective.
ex: La fábrica necesita obreros que hablen español.
3. Adverbial clauses modify the verb as adverbs do (answering questions where, how, when).
ex: Salvador me esperará en el lugar que me diga.
4. When the main verb in main clause indicates: VOLITION, INTENTION, WISH, PREFERENCE.
5. Expressions of Emotion (regret, fear, pity, hope, surprise, etc).