The subjunctive (le subjonctif) is a mood that is used to express: desire, uncertainty, probability, and other subjective feelings about a situation. It is formed by regular and irregular verbal conjugation and can be used in all tenses (but is not a tense itself)! The opposite is 'indicative' (l'indicatif), which is used when something is probable or certain - it 'indicates' something (the indicative is essentially all the normal temporal conjugations you have been learning thus far).AQA gives these examples: "Je suis certain / il est probable qu’il a le talent nécessaire pour réussir" (near certainty, therefore indicative) vs "Il est possible qu’il ait le talent nécessaire pour réussir" (50% chance of being a reality, therefore subjunctive).
The subjunctive is most often preceded by 'que', and sometimes you can tell which phrases ending in 'que' will lead to the subjunctive, e.g. 'bien que', 'afin que / pour que', 'à moins que'. It's a good idea to look these 'leading' phrases up and memorise them, as they're a good way to get the subjunctive in during an exam or in an essay! You can also memorise which verbs may lead to the subjunctive: a wish (vouloir, souhaiter, désirer + que); doubt/fear (douter, avoir peur + que); emotions/opinions (aimer, préférer + que); regret/happiness (être désolé / content + que); and finally, certain impersonal expressions (il faut, il semble, il est important + que).