The perfect tense, or "passé composé" is used to demonstrate an action that is in the past and has been completed, for example "Yesterday, I went to the shop", "Hier, je suis allé(e) au magasin".However, the imperfect tense is used for 3 reasons.The first of these reasons is to for a description in the past such has, "Yesterday, it was raining", "Hier, il pleuvait". The second reason is to demonstrate an action that you used to do "When I was young I used to dance", "Quand j'étais jeune je dansais". The final reason why we use the imperfect tense is to demonstrate an incomplete or an interrupted action, for example "I was listening to music when...", "J'écoutais de la musique quand...".