The subjunctive tense is used in Spanish to express wishes, desires, doubt, requests, impersonal statements and emotions. Some key uses are:
Negative opinions- for example 'no pienso que' and 'no creo que' trigger the subjunctive in the verb that follows
No pienso que sea importante (I don't think it is important)
Requests or recommentations- for example when you are telling someone else to do something you would use the subjunctive
'quiero que me compres estos zapatos' (I want you to buy me these shoes)
Impersonal statements- these are statements that give an opinion
'es importante que vayas a colegio' (it is important that you go to school)
Other examples of impersonal statements: es imprescindible que, me alegra que, es triste que etc