The perfect and imperfect are both past tenses, but they are used to say different things:
The perfect tense is used to convey completed actions in the past.
eg. I walked to school yesterday.
The imperfect tense is used for a number of things:
1. What was happening. eg. I was walking to school when I saw my friend.
2. What used to happen. eg. I used to walk to school.
3. A repeated action in the past. eg. I walked to school everyday.
4. A continuous action in the past. eg. I walked to school during the summer months.
5. A description in the past. eg. It was cold.