The imperfect tense is used to refer to actions in the past that occurred repeatedly.
I used to walk every day.
Yo caminaba cada día.
The imperfect tense is also used to refer to actions in the past that occurred over an extended period of time.
I used to eat paella frequently.
Yo comía frecuentemente paella.
The imperfect tense is also used to “set the stage” for an event that occurred in the past.
We were coming home when we saw Juan.
Veníamos para casa cuando vimos a Juan.