The subjunctive is a mood that is very commonly used in Spanish. It is not very common in English, but the closest equivalent would be the use of "were" in phrases such as "If I were a doctor, I would save lives." In Spanish, there are many tenses of the subjunctive, and it is necessary if you are referring to something that is hypothetical, such as something that you want to happen, or something that you would recommend. It is also used in many impersonal expressions, and to express emotion, hope or doubt. If the phrase expresses any of the aforementioned things, the first verb is conjugated in the indicative mood, whilst the second is conjugated in the subjunctive mood.
Here are a few examples: Firstly, this is sentence that expresses doubt: "Dudo que esté aquí." ("I doubt he is here"). The first verb "dudar" is conjugated in the indicative mood, whilst the second, "estar" is conjugated in the subjuctive mood. This is because the doubting is certain, whilst whether he is here or not is uncertain. Secondly, this is a sentence that refers to something that you want to happen: "Quiero que vayas" ("I want you to go"). The first verb "querer" is conjugated in the indicative mood, whilst the second, "ir", is conjugated in the subjuctive mood. This is because there is a change of subject and it is a desire, which may not be fulfilled, as one can never know how much our wishes will actually affect other people's actions. Athough "I" may want "you" to go, "I" do not know whether "you" will go or not. Thirdly, this is a sentence that expresses emotion: "Me alegro que estés aquí" ("I am happy that you are here"). The subjuctive is always required after expressions of emotion, which is why the first verb "alegrarse" is conjugated in the indicative mood, whilst the second verb, "estar", is conjugated in the subjunctive mood.
Now that you have seen the circumstances in which one must use the subjunctive, you should learn how to conjugate verbs in the subjunctive mood. In order to do so in present tense, one must take the stem of the present indicative "yo" form, and add the endings "e, es, e, emos, éis, en" when dealing with AR verbs, and "a, as, a, amos, áis, an" when dealing with IR or ER verbs. For example, "Tengo" ("I have") would become "Tenga", and "Hablo" ("I speak") would become "Hable".