Answer: Passé composé is used when the action happened and finished in the past.
Imparfait is used when an action happened over a period of time. The English equivalent is the past progressive tense.
Explanation: In many complex sentences, both are used. For example: While I was studying the phone rang.
Lorsque j'étudiais, la téléphone a sonné.