That's a great question, and one that we, as non-native French speakers, ask quite a lot. The most important thing to remember about the imperfect tense is that it is not perfect. And it's not perfect because we never really know when exactly it happened. For example, let's say I'm talking about what I did yesterday. "I played football yesterday". We know exactly when it happened, and we can perfectly pinpoint an exact moment on a timeline. Therefore, we would stay away from imperfect tense and use the passé composé (J'ai joué au foot hier).On the other hand, let's say I'm talking about my hobbies when I was a child. "I used to play football in the park". It's a lot more vague isn't it? We don't really know when exactly I played football or even for how long, we just know that it is something that happened at some point in the past for a certain amount of time. It's too uncertain or imperfect to pinpoint, so we use the imperfect tense "Je jouais au foot au parc".