The use of the subjunctive "mood" can be somewhat contentious, and there are not necessarily straightforward rules as to its use. Partly because of this difficulty, it is a grammatical mood that examiners often like to test, and is impressive to use in your own oral or written examination.
One rule which is not subject to discussion is that it cannot be used unless preceded by an expression ending with "que" (or, occasionally, "qui"). Also, the subject of the main clause should be different to the subject in the subordinate clause (the one in which you will use the subjunctive). If the subject is the same, there is no need to use the subjunctive, and you should simply use an infinitive, sometimes on its own, sometimes preceded by "à" or "de"- check your rules for infinitives to find out which.
There are certain set phrases and conjunctions, often relating to cause and effect, which (almost) always require the subjunctive, and these you can use quite reliably with the subjunctive. These include "bien que", "à condition que", and "afin que". Other expressions have common threads, and these can be grouped under the categories of "necessity", "possibility", "doubting", "desiring", and "judging". The subjunctive may seem an elusive concept, but if you consider an expression to relate to one of the aforementioned categories, then it will almost certainly require the subjunctive.