The passé composé in French is used for singular, completed actions in the past. The imperfect tense is used for ongoing or continuous actions over a non-specified period of time in the past.Compare these sentences:
1.Hier j'ai joué au foot - yesterday I played football2. Je jouais au foot quand j'étais petit - I used to play/I played football when I was little
In the first sentence, the passé composé is used to say I played football yesterday: a singular, completed action in the past. In the second sentence, the imperfect tense is used to say I played football over a continuous, extended period of time in the past, i.e. when I was little.
You can also use the passé composé and imperfect in the same sentence to distinguish between an ongoing and completed action in the past. For example:
3. Je jouais au foot quand il a commencé á pleuvoir - I was playing football when it started to rain
The action of me playing football was ongoing over an unspecified period of time (imperfect), however it only started to rain once, i.e. a singular, completed action (passé composé).