Imagining a different past
For an unreal past, use hätte or wäre plus Partizip II. Choose the same auxiliary family as in Perfekt. This describes an event that did not happen, rather than a present wish.
Understand the idea
An unreal past describes an imagined alternative to a completed event. Unlike a present hypothetical, it requires both a past participle and a Konjunktiv II auxiliary. The construction is useful for regrets, explanations and imagining different past outcomes.
Build it step by step
Choose hätte or wäre according to the verb's usual Perfekt auxiliary. Add the participle and conjugate the auxiliary for the subject. A wenn-clause puts the finite auxiliary after the participle. A following main clause starts with its own finite auxiliary. Modal double-infinitive constructions need an additional pattern treated elsewhere.
See it in a sentence
Wenn ich mehr gelernt hätte, hätte ich bestanden.
Wenn wir früher gebucht hätten, wäre es billiger gewesen.
A useful memory aid
Begin with what actually happened, then express the unreal alternative. This keeps the meaning tied to a past event rather than a present wish.
A common trap
Do not use würde plus a bare infinitive when you specifically mean a completed unreal past. Also keep the auxiliary choice consistent with the lexical verb.