It's a mood, not a tense, and that's a different question entirely
Most Spanish classes introduce the subjunctive by teaching its endings, which quietly reinforces the wrong question. English tenses are almost entirely about time, so English speakers default to asking "when does this happen?" The Spanish subjuntivo doesn't answer that question at all. It's a mood (Spanish grammar recognizes three: subjuntivo, indicativo, and imperativo), and mood answers something else entirely: is the speaker presenting this as a fact, or as something wanted, doubted, ordered, or felt?
Compare Creo que tiene razón ("I think he's right," indicative: you're asserting the belief as your own claim) with Espero que tenga razón ("I hope he's right," subjunctive: the same content, now framed as hoped-for rather than asserted). Nothing about time moved between those two sentences; both are about right now. What changed is the speaker's stance toward the content of the que-clause. The Real Academia Española's own glossary entry puts it in almost exactly those terms: the subjunctive mood shows up constantly in contexts that are no reales, no verificados o no experimentados: unreal, unverified, or not (yet) experienced.
That also means the subjunctive isn't rare or bookish in Spanish, unlike English's subjunctive, which mostly survives in a handful of fossilized phrases like "if I were you." It turns up in ordinary spoken sentences dozens of times a day, any time the main clause introduces desire, doubt, emotion, or permission.
Building it: swap the vowel, not a new set of endings from scratch
The formation rule is mechanical once you see the pattern: take the yo form of the present indicative, drop the final -o, and add the "opposite" set of endings. Verbs ending in -ar switch to -e-based endings: hablar → hablo → habl- → hable, hables, hable, hablemos, habléis, hablen. Verbs ending in -er or -ir switch to -a-based endings instead: comer → como → com- → coma, comas, coma, comamos, comáis, coman; vivir → vivo → viv- → viva, vivas, viva....
Because the stem is lifted straight from the yo form, any irregularity already baked into that form carries straight over into every person of the subjunctive, not just yo: tener → tengo → tenga, tengas, tenga...; poner → pongo → ponga, pongas...; conocer → conozco → conozca, conozcas.... If you already know a verb's irregular yo form in the present indicative, you already know its subjunctive stem.
Spelling-preserving changes apply in every person of the subjunctive, which is a real difference from the present indicative (where they only show up in yo): -car verbs swap to -que (buscar → busque), -gar verbs swap to -gue (llegar → llegue), and -zar verbs swap to -ce (empezar → empiece). These exist purely to keep the consonant sound intact: the same logic Spanish spelling uses everywhere else, not a subjunctive-specific quirk.
Stem-changing verbs split into two behaviors. -ar and -er "boot" verbs change in every person except nosotros and vosotros, mirroring the present indicative's own pattern: pensar → piense, but pensemos; poder → pueda, but podamos. -ir stem-changers go one step further and pick up a second, smaller vowel change specifically in nosotros/vosotros: dormir → duerma everywhere else, but durmamos (o→u, not o→ue); pedir → pida everywhere else, but pidamos (e→i).
Six verbs where the drop-the-o trick has nothing to grab onto
Ser, estar, ir, haber, saber, and dar don't build a subjunctive stem from their yo form at all: sea, esté, vaya, haya, sepa, and dé. The reason the mechanical rule breaks down here is specific, not just "these verbs are weird": the strip-the-o trick needs a yo form that's a plain stem plus -o. None of these six qualifies. Soy, estoy, voy, and doy end in -oy, not -o; sé ends in -é; he doesn't end in -o at all. With no plain -o ending to strip, there's no regular stem to derive an ending from, so these six are memorized outright rather than built from a rule.
The same six verbs are the ones that already break nearly every other regular pattern Spanish has: ser and estar fail the normal present-tense rules too, and saber is one of the handful of verbs whose yo form (sé) doesn't even end in -o in the present indicative, which is exactly why its subjunctive can't be derived the ordinary way either.
What actually triggers it: desire, influence, doubt, and emotion, not a vocabulary list to memorize
The RAE's own grammatical categories give the real trigger. Verbs of desire or volition (querer, esperar, desear) put the following clause in the subjunctive: Quiero que nieve (I want it to snow); Espero que vengas (I hope you come); Deseo que te mejores (I hope you get better), all RAE's own illustrative examples. Verbs of influence (requests, orders, permission, advice) do the same: Prohibió que fumáramos (He forbade us to smoke); Ha permitido que vayan solos (She's allowed them to go alone); Te aconsejo que lo hagas a mi manera (I advise you to do it my way).
Decir is the clearest illustration that mood carries real meaning here, not just style. When decir introduces a subjunctive clause, it's functioning as a verb of influence, an indirect command: Me dijo que volviera means "He told me to come back." When decir introduces an indicative clause instead, it's a plain verb of speech reporting a fact: Me dijo que volvía means "He told me he was coming back." Same verb, same tense on decir itself, a different meaning depending on the mood of the clause that follows. Swapping one for the other doesn't just sound off; it changes what was actually said.
There's a structural condition underneath all of this: the subjunctive clause needs its own subject, different from the main clause's. When both clauses share a subject, Spanish collapses to an infinitive instead of a que-clause: Quiero salir (I want to leave), not Quiero que salga. The que + subjunctive construction shows up specifically when the wanting, doubting, or feeling belongs to one person and the action belongs to another: Quiero que salgas (I want you to leave). Emotional reactions (alegrarse, sentir, sorprender) and impersonal value judgments (es bueno/malo/una lástima que) follow the identical logic, even though the RAE glossary doesn't bundle them under the same label as the desire and influence verbs above.
Quizás and tal vez: the one spot where you actually get to choose the mood
Adverbs of doubt (quizás, tal vez, acaso) are unusual because they allow either mood, and the choice isn't free variation. Subjunctive after these adverbs signals weaker likelihood and stronger doubt; indicative reads as more confident and assertive. Tal vez tenga razón and Tal vez tiene razón are both grammatical, but they don't claim exactly the same thing.
Word order constrains which moods are even available. Grammatical analyses of these adverbs (documented in the Instituto Cervantes' own teacher-training materials) show that when the adverb comes before the verb, both moods are possible; when it comes after the verb, only the indicative is grammatical. Tal vez tenga razón works; Tiene razón, tal vez only works in the indicative: Tenga razón, tal vez isn't standard Spanish. A lo mejor is the outlier in this group: it takes the indicative regardless of position, full stop; a lo mejor tenga razón isn't used at all.
Cuando + subjunctive: standing in for a future tense Spanish won't let you use there
Spanish blocks the future and conditional forms inside temporal clauses introduced by cuando, mientras, and similar connectors, whenever the clause points at future time. RAE's own grammar states the restriction directly with desde que: only desde que llegue is grammatical; desde que llegará and desde que llegaría are not. The present subjunctive is what fills that gap.
Vendré cuando pueda ("I'll come when I'm able to") uses the subjunctive because the coming-and-being-able-to are both still pending, not yet real. Compare Vengo cuando puedo: indicative, a general habitual statement ("I come whenever I'm able to," describing a standing fact about the speaker, no specific future event pending at all). Same two verbs, different mood, and the shift is exactly the real-versus-not-yet-real distinction from the opening section, just applied to time instead of to desire or doubt.
Spanish grammar preserves an even older fossil of this same idea. The simple future tense has a subjunctive counterpart most speakers never use: the futuro simple de subjuntivo (cantare) and futuro compuesto de subjuntivo (hubiere cantado). Per the RAE, their use today is reduced almost exclusively to legal texts, one of the few corners of the language where a form everyday speech abandoned centuries ago is still technically alive.