Both tenses refer to actions in the past. With the passé composé, we use this to describe an action which was completed in the past at a specific moment.
For example: Je suis tombé (I fell).
We use the imparfait to describe habitual (was doing/used to do) or background actions in the past, or to set the scene in a description
For example: Quand j'étais petit (background action), je jouais (habitual) souvent avec mon frèreWhen I was young, I used to play often with my brother.
Look at both tenses used in this sentence to see how they are used:
Pendant que je regardais la télé, mon portable a sonnéWhile I was watching TV, my phone rang