How do I differentiate the use of "el imperfecto" from "el pretérito" when describing actions in the past?

This is a tricky grammatical question that is asked a lot by students, but there are several differences between the two. Perhaps the most important difference is that el pretérito is used to refer to single, completed actions in the past, where as el imperfecto refers to previous habitual actions or events that occurred over a period of time.
E.g. Ayer, jugué al fútbol con mis amigos en el parque (Yesterday, I played football in the park with my friends.) versus De nino, jugaba al fútbol con mis amigos cada domingo.
Another difference is that el imperfecto is used to serve as a background for a main action which is described using el pretérito.E.g. Escribía una carta a mi tía cuando me llamó de la nada (I was writing a letter to my aunt when she called me out of nowhere).

Related Spanish A Level answers

All answers ▸

What are the present subjunctive forms of the verb “ir”


Translate the sentence: " Suddenly, he felt really tired and a taxi took him home".


When do you use the Preterite and the Imperfect?


What is the best way to revise for an MFL A-level written exam