L'imparfait is used to express a habit, duration or description. It is a past continuous tense. Generally, when two actions take place simultaneously, the action taking place in the background is put in l'imparfait, while the main action is in passé composé. 
L'Imparfait is constructed by take the 'Nous' form of the verb, striking out the 'ONS', and adding the endings, 'ais, ais, ait, ions, iez, aient', respectively for 'Je, Tu, Il/Elle, Nous, Vous, Ils/Elles'. 
In Passé Composé, you conjugate the verb in 'avoir', and add a part participle. For 'suite' form verbs, you conjugate in 'être', and add the past participle (according to gender and number). 

eg.) When I was leaving, the phone rang.  
--> Quand je sortais, le téléphone a sonné. 

sortais - l'imparfait
a sonné - passé composé