Generally, the imperfect tense should be used for events which happened regularly in the past or which took place over a period of time. The perfect tense is used more for one off events. So for example, if you wanted to say "I used to play football", you would use the imperfect: "Je jouais au foot". But if you just wanted to say "I played football", then you would use the perfect: "J'ai joué au foot".