As a French Tutor I have always been fascinated by the French grammar and its logic that is on the whole so similar to Maths. I find the subjunctive opens up so many possibilities.
There are many cases but the general and easiest case will be dealt with here.(A lesson will be needed for full details). It can often be used when infinitives in English cannot be used in French where the subject is different. Think of the example "I want to drink". The infinitive can be used in French in the same way as in English as there is only one subject involved here ie "Me".(Je veux boire).
It becomes interesting when one wants to say for example "I want him to drink". There are now two subjects here ie "Him and me". The infinitive now must not be used in French. We now have to translate " I want that he drinks" with one small change beyond that. The subjunctive is used in the subordinate clause "He drinks" but not in the main clause "I want". Therefore, the whole sentence will read "Je veux qu'il boive", instead of "Je veux qu'il boit" (which would be incorrect). The technical reason why a subjunctive is used is because "Wanting" conveys a significant uncertainty and therefore the "Drinking" may never become reality (It is hypothetical). (That is NOT to say that "Maybe" sentences are allowed a subjunctive). This now leads us to how the subjunctive is formed.
Apart from the seven irregular or semi irregular verbs in the present subjunctive the rule is as follows:
Take the the "Ils" form of the present tense and remove the "Ent" for the first column only and add the present tense "ER" verb endings. In the second column the "Nous" and "Vous" forms will be identical to the imperfect tense and the "Ils" form will be identical to its present tense counterpart. Here is "Boire" in the present subjunctive:
Je boive Nous buvions
Tu boives Vous buviez
Il boive Ils boivent
Please note that the imperfect subjunctive and the pluperfect subjunctive are extremely rarely used in conversational French and rarely in written French nowadays. They need to be recognised at A- Level and beyond. The perfect subjunctive is used still as it just requires the present subjunctive of "Avoir" or "Être" + the Past Participle.
One could be forgiven for thinking that "Espérer que" clauses would be followed by a subjunctive, but this would not be correct. It could be because "Hope" is thought to be something likely which requires an indicative in French. However, Spanish does not take the same view here.