The perfect and imperfect tenses are both used to describe a past tense in French. The imperfect tense is often a more descriptive tense and is used to set the scene and 'frame' the more punctual perfect tense. If you were wanting to describe scenery then you would use the imperfect tense. The imperfect tense can however be used to describe a repeated action in the past when the duration of that action is not specified. If, for example, you wanted to say 'I used to play football', you would write 'je jouais au foot'. The perfect tense is used to describe action and more punctual events. You might start off by saying that a room was quiet for example to frame action but as soon as you say, 'the man walked in', you would use the perfect tense to describe this more instantaneous, active event. The perfect tense can also be used to describe something you used to do in the past if the duration of the activity is given. For example, you would say 'j'ai joué au foot pendant huit ans'.