The imperfect tense is used when there isn't a definite beginning or end to an action in the past, and this action is repeated or continuous, eg siempre jugaba en el parque (I always played in the park).
The preterite tense tells us that the action took place at a specific point in time and is completed, eg ayer jugué en el parque (yesterday I played in the park).
The sentence veía la tele cuando llegó mi amigo (I was watching television when my friend arrived) is a good example of the difference between the two tenses. The imperfect is used to describe something that was happening at the time (veía la tele) and the preterite is used to talk about a single completed event (llegó mi amigo) that happened during the longer action.
Complete the sentences with either the preterite or imperfect.