I use the acronym 'WEIRDO' to remember the main instances when you use the subjunctive. The letters stand for:Wishes e.g 'Quiero que ...'Emotions e.g 'Me alegro de que ...'Impersonal expressions e.g 'Es imprescindible que ...'Recommendations e.g 'Recomiendo que ...'Doubt/Denial e.g 'Dudo que ...'and Ojalá (meaning 'if only').
Remember, technically the subjunctive is a mood rather than a tense, and it is used to talk about desires, possibilities etc whereas the indicative is used more for factual/definite statements.