Sometimes you’ll just be going along, minding your own business... and then, bam! In comes the preterite!
Ella me llamó cuando yo me iba.
Shecalledme when Iwas leaving.
Empezó a nevar cuando nosotros estábamos en el hotel.
Itstartedsnowing when wewereat the hotel.
You use the imperfect to talk about something that was happening in the past, and the preterite gets used to talk about an event that interrupted that ongoing action.