At or during the time that something happens.
Call me when you get home.
When the movie ended, we went out.
For a future event, use the present form after when: Call me when you arrive, not when you will arrive.
Common phrases & grammar
when possible · when necessary · when ready · when appropriate
when + subject + verb, subject + verb
subject + verb + when + subject + verb