'It was raining when the phone rang' — the imperfect is the ongoing backdrop (raining), the preterite is the single snap of action (rang). Spanish uses two past tenses because it distinguishes the movie from the snapshot.
Completed vs. ongoing
Spanish has two simple past tenses that differ in aspect, not merely time. The preterite views an action as a completed, bounded event ('comí' — I ate). The imperfect views the past as ongoing, habitual, or descriptive background ('comía' — I was eating / I used to eat). Learners must choose based on how the action is framed.
A common pattern: the imperfect sets the scene (ongoing background) while the preterite reports the event that interrupts it. 'Leía cuando sonó el teléfono' — I was reading (imperfect) when the phone rang (preterite).
'Siempre íbamos a la playa' (imperfect, habitual: we always used to go) vs. 'Fuimos a la playa ayer' (preterite, one completed trip: we went yesterday).
- You describe weather that was ongoing: 'It was raining.'
- Decide whether that is a bounded event or ongoing background.
- Choose preterite 'llovió' or imperfect 'llovía'.
What you should see: Ongoing background takes the imperfect: 'llovía'. The preterite 'llovió' would mean it rained as a single completed event.