Normally you use the subjunctive to imply doubt or uncertainty. For example, you might say je doute qu'il soit dans le jardin.Verbs in the negative also trigger the subjunctive. For example, we would say je pense qu'il est dans le jardin. But if we said je ne pense pas qu'il soit dans le jardin, we need to use the subjunctive as the negative implies a sense of uncertainty. Verbs of fearing also take the subjunctive, for example, je crains qu'il soit dans le jardin. It is used with verbs of personal desire such as vouloir. eg. Je veux qu'il soit dans le jardin. Similarly, it is used with verbs expressing emotion. eg. Je m’étonne qu'il soit dans le jardin.It is used with impersonal expressions of impossibility such as c'est impossible qu'il soit dans le jardin and of necessity- il faut qu'il soit dans le jardin.
If you're not sure whether to use the subjunctive or not, you can normally avoid it. For example, you could say 'il est nécessaire de' rather than il faut que. Remember that the subjunctive is always introduced by 'que'. There are a few other conjunctions and expressions which use the subjunctive that you might like to have a look at. But the main uses are listed above.