wenn
if
Introduces a subordinate clause that names a condition for the action in the main clause (conditional).
Wenn es morgen schön ist, gehen wir schwimmen.
If the weather is nice tomorrow, we'll go swimming.

if / when
Loading your saved state.
if
Introduces a subordinate clause that names a condition for the action in the main clause (conditional).
Wenn es morgen schön ist, gehen wir schwimmen.
If the weather is nice tomorrow, we'll go swimming.

'Wenn' (if/when) is a subordinating conjunction. The conjugated verb of the 'wenn' clause therefore always stands at the end.
Ich helfe dir, wenn ich mit meiner Arbeit fertig bin.
I'll help you when I am finished with my work.
If a sentence begins with a 'wenn' clause, the 'wenn' clause occupies position 1. The following main clause must then begin with the verb (inversion).
Wenn du Zeit hast, können wir ins Kino gehen.
If you have time, we can go to the movies.
'Wenn' can describe a condition (conditional) or a point in time (temporal). A condition answers the question 'Under what condition?'. A point in time answers the question 'When?'. The context makes the difference clear.
Wenn es regnet, wird die Straße nass. (Bedingung)
If it rains, the road will get wet. (condition)
To emphasize that an action happens repeatedly, 'wenn' (when) is often combined with signal words such as 'immer' (always), 'jedes Mal' (every time), or 'oft' (often).
Immer wenn ich in diese Stadt komme, besuche ich das alte Café.
Whenever I come to this city, I visit the old café.
The fixed combinations 'auch wenn' (even if/even though) or 'selbst wenn' (even if) introduce a subordinate clause that names a counter-reason or limitation. The action in the main clause happens anyway.
Er ist zur Arbeit gegangen, auch wenn er sich nicht gut fühlte.
He went to work even though he wasn't feeling well.
than / when / as
'wenn' and 'als' can both describe a point in time, but they are not used in the same situations. 'als' is used for a one-time event or state in the past. 'wenn' is used for conditions, for repeated events, or for one-time events in the present and future. Learners often confuse them because both have to do with time. Remember: one time in the past: 'als'. Repeated, conditional, or future: 'wenn'.

Wenn der Lehrer morgen Zeit hat, besprechen wir die Reise für das Projekt.
If the teacher has time tomorrow, we will discuss the trip for the project.
Als Herr Weber gestern nach Hause kam, war das Essen schon fertig.
When Mr. Weber came home yesterday, the food was already ready.