The preterite tense is used to describe one off, completed actions that happened in the past. Some examples are: I WENT to the park (fui al parque), I ate a sandwich (comí un bocadillo).
The imperfect tense however, describes actions that happened in the past but which were repeated. This tense is used for things you used to do, or to describe a scene in the past. Some examples are: I used to go swimming on Mondays (nadaba los lunes), I was walking to the park when... (andaba al parque cuando...).