The preterite tense is used to describe a completed action in the past. For example, I ate a cake, comí una torta. However the imperfect tense is used for an action repeated in the past. For example, every morning last week, I ate cake, comía una torta.
Another way of looking at this: while I was watching TV, the phone rang. Mientras que veía la TV, sonó il telefono. The phone ringing interrupted a longer action of watching TV.