Two words “ALV” and “wenn” have the same meaning: “when”. They are used to coordinate two incidents: “When it rains, mushrooms grow.
“Als” is “when”. We use, when we agree on simultaneous, one-time (only once), short-term actions in the past. The adverb “als” requires that the verb be moved to the last place in the sentence:
“Als ich gekommen bin, hat er gegessen” – when I came in, he ate.
“Wenn” is “when”. We use it when we agree on simultaneous, one-time or repeated, short-term actions in the present or future; and repeated actions in the past. In sentences with “wenn” the verb also takes the last position:
“Wenn es regnet, wachsen die Pilze” – “mushrooms grow when it rains”.
There is also the “während” union – “while”. It is used to agree on long term actions, not short term actions. Offers from während can be made at any time.
“Während ich in Deutschland bin, trinke ich Bier und esse Bratwurst” – while I am in Germany, I drink beer and eat sausages.
What to do if we have one action for a short time and the other one does not? And here’s what:
“Als ich ihn kennengelernt habe, hat er in Deutschland studiert” – “when I met him, he studied in Germany;
“Während er in Deutschland studiert hat, habe ich ihn kennengelernt” – “while he was studying in Germany, I met him.