It can be tricky to tell - and sometimes it's even a matter of choice! However, there are some simple rules that you can remember. The passé composé is used for specific events - things that happened, like a football game, at one point in time, and then ended. The imparfait, on the other hand, is used when you want to talk about events in the past that continued over an extended period. For example, if you want to say that every day as a child you played football, you would use the imparfait as it was a continued activity - 'je jouais au foot tous les jours' - but if it was a one-off occurence, or you're describing a specific game of football, it would have to be the passé composé (something like 'mardi dernier j'ai joué au foot').