A conditional clause gives a condition or circumstance that must be fulfilled in order for an action to take place. It always starts with "wenn," "falls," or "sofern."
The question words are: "Wann?" "Unter welcher Bedingung?"
„Ich komme nach Hause, wenn ich mit der Arbeit fertig bin.“The subordinate clause states the conditions that are necessary for the main clause to occur ⇒ First I have to finish work, then I come home.
If the condition is fulfilled, then I will go for a walk.
Whether we use "wenn," "falls," or "sofern" depends on the likelihood of the condition being fulfilled.
"Falls" and "sofern" can only be used when the probability is relatively small.
"Sofern" can only used with negative sentences. "Falls" can be used whenever.
When talking about the past, something either happened or it didn't. Therefore we can only talk about things in a hypothetical way.
To do this, we use subjunctive 2 and "wenn."
I actually failed the exam, but I want to say what would have happened under different circumstances ⇒ subjunctive 2.
Here's an entire lesson about the subjunctive 2 and how to use it: subjunctive 2.
Main clause first: when the main clause comes first, everything stays the same.
Subordinate clause first: this is more common, because the conditions are the most important information in the sentence.
When the subordinate clause comes first, it is possible to leave "wenn" out. The conjugated verb then moves to position 1 (this is one of the exceptions to the rule about the conjugated verb going in position 2!).
If you leave out "wenn," it sounds more like a warning or a threat.