The subjunctive in French is used when talking about theoretical situations, and also with certain phrases using 'que' - this can be tricky, because the 'que' phrases must be learnt. The subjunctive is also difficult because there are a lot of irregular verbs.
How?
First, this is how to construct the regular subjunctive, for -re, -er and -ir verbs:
Start with the present tense 3rd person plural form of the verb (eg ils restent, ils mangent). Remove the ‘ent’ to find the stem, and add the following endings: e, es, e, ions, iez, ent.
So the process for ‘manger’ looks like this: ils mangent -> mang -> je mange, tu manges, il/elle/on mange, nous mangions, vous mangiez, ils/elles mangent.
Irregular verbs must, unfortunately, be learnt. Here are some useful examples:
Avoir: j’aie, tu aies, il/elle ait, nous ayons, vous ayez, ils/elles aient
Être: je sois, tu sois, il/elle soit, nous soyons, vous soyez, ils/elles soient
Aller: j’aille, tu ailles, il/elle aille, nous allions, vous alliez, ils aillent
When?
1. The first way the subjunctive is employed is with expressions of doubt. While you would use the indicative with phrases like ‘je pense’ and ‘je crois’, you would use the subjunctive with their negative opposites: ‘je ne pense pas’ and ‘je ne crois pas’.
Ex: Je ne crois pas qu’il soit ici (I do not believe he is here)
Je doute qu’il aille (I doubt he’s going)
These expressions of doubt can also be impersonal - For example, il n’est pas clair que (it is not clear that), il semble que (it seems that).
2. The second way you use the subjunctive is with phrases of personal opinion, followed by a ‘que’ and a verb.
Ex: Ma mère veut que je fasse la vaisselle (My mother wants me to do the washing up)
Il est triste qu’elle ne vienne pas (He’s sad that she isn’t coming)
J’ai peur qu’ils soient en retard (I am scared that they’re late)
3. Another way the subjunctive is used is with certain ‘que’ phrases that do not express doubt: these must be learnt. Here is a non-exhaustive list of useful phrases:
Il faut que (It is necessary that)
Bien que, quoique (although)
À moins que (unless)
À fin que (so that)
Pourvu que (in order that)