This is something that many students struggle with but luckily it is simpler than it seems and once you know it, you know it! I like to use an example that I can refer back to if I get confused: Estaba leyendo un libro cuando sonó el teléfono. Translation: I was reading a book when the phone rang. Here, the action of reading is in the imperfect tense because it is a continuous action (it is going on for a period of time). The ring of the phone is in the preterit tense because it is interrupting the continuous action and also because it is an event that occurs once in one moment of time. If you think of your own example where a continuous action is being interrupted (it helps if you make it funny or bizarre) then you can relate the uses of the tenses into other situations. Such as talking about a hobby that you used to do when you were younger - imperfect - or that one time you fell over on the way to school - preterit.