A description, habit or situation in the past, without a clear beginning or end. Quand j'étais petit, je jouais au foot. (When I was little, I used to play football.)
How to form it
The stem of nous in the présent (without -ons) + ais, ais, ait, ions, iez, aient. Nous parlons → je parlais. Only être is different: j'étais.
Pitfalls
Imparfait or passé composé? The imparfait is the background, the passé composé the event: Il pleuvait quand je suis sorti. (It was raining when I went out.)
nous mangions without an extra e (the i already follows), but je mangeais with e.
-ais, -ait, -aient all sound the same. Look closely at the subject.