The perfect tense is used to describe actions that have been completed, or that happened a certain number of times. For example if you want to talk about something that you did at a specific time in the past, you can use the perfect tense. For example:Hier, j'ai fait mes devoirs = Yesterday, I did my homework.
The imperfect tense is usually used to describe ongoing actions in the past, and can often be used where in English we would say 'I used to' or 'I was doing something'. It can also be used for descriptions in the past. For example:Quand j'étais plus jeune, je jouais au foot = When I was younger, I used to play football.
When describing something that happened in the past, you can use the imperfect tense to 'set the scene', and the perfect tense to describe things that happened. For example:Il lisait quand elle a frappé à la porte = He was reading when she knocked at the door.