The preterite tense is used to express something that happened once in the past. It is used to describe something that has finished; for example, you would use the preterite to say that "I went to the gym yesterday (Ayer fuí al gimnasio). However, the imperfect tense is used to describe something in the past that was ongoing, or "was happening" for a while. There is no specific beginning or ending when we use the imperfect. For example, it can be used to describe something you "used to do" as a child. You can use the imperfect tense to say that when you were a child, you used to go to your grandparent's house on Sundays: "Cuando era niño, iba a la casa de mis abuelos los domingos."