Because understanding how to use these two tenses is so tricky, and perhaps because there's a certain amount of overlap in their meaning, some myths have developed about the differences between them and they can be misleading. Don't believe them.

Myth #1

You may hear that the imparfait is used for events that happened a long time ago, and the passé composé for more recent events (or the other way round). This is complete baloney.

The following story is very recent:

Il y a trente secondes j'avais 32 dents. (imperfect) (30 seconds ago I had 32 teeth.)
J'ai mangé du pop-corn. (p.c.) (I ate some popcorn.)
Il y a eu un grain non-éclaté. (p.c.) (There was an unpopped kernel.)
Maintenant, j'ai 31 dents et demie. (present) (Now I have 31½ teeth.)

The following story took place over 2000 years ago:

Jules César était le général des armées romaines... (Julius Caesar was the general of the Roman armies...)
quand elles ont conquis la Gaule en 51 av. J.-C. (when they conquered Gaul in 51 B.C.)

(Gaul was the name of the area of Europe that corresponds to modern-day France)

Myth #2

You may hear that the imparfait is used to talk about events that last a long time, whereas the passé composé is used for events that are over quickly. This idea, too, should not be given the time of day.

Les dinosaures ont vécu sur la terre pendant 160 millions d'années.
(The dinosaurs lived on the earth for 160 million years.)

Ce papillon a vécu sur la terre pendant trois heures, avant d'être attrapé par un entomologiste.
(This butterfly lived on the earth for three hours before being caught by an entomologist.)

Autrefois, les dinosaures régnaient sur la terre.
(In the past, the dinosaurs ruled the earth.)

Le papillon voltigeait dans les fleurs quand l'entomologiste l'a attrapé.
(The butterfly was fluttering in the flowers when the entomologist caught it.)

Myth #3

Sometimes people say that the passé composé is used for completed actions, whereas the imparfait is used for actions that are still going on in the present. This idea is not as wrong as the previous myths, but it's not very correct either.

The difference is not that the passé composé is used for completed actions and the imparfait for uncompleted actions. It is more that the passé composé tells you that an action has been completed, whereas the imparfait doesn't concern itself with telling you if an action has been completed or not. The action may, at a later point in time, have been completed. Or it may not. It's left up in the air. (If you ask a passé composé if the action has been completed, it's response will be 'yes'. If you ask an imparfait if the action has been completed, it's response is not 'no', but 'no comment'.)

Le papillon voltigeait dans les fleurs.
(The butterfly was fluttering in the flowers.)
(Has it completed its fluttering? This sentence doesn't tell us, although the sentences in Myth #2 tell us that it is dead, so in fact it has completed the action (at a later date).)

Il y a vingt ans, j'allais au travail.
(Twenty years ago, I was going to work.)
(Was the journey completed? This sentence doesn't tell us, although the stories in the previous explanations tell us that the narrator witnessed an accident, helped an unfortunate young man to reach a hospital, fell in love, and never made it to work that day, so no, it wasn't.)

And furthermore, if you want to talk about an action that started in the past and is (for sure) still going on in the present, you don't use the passé composé, and you don't use the imparfait, you use the present tense, with depuis.

J'habite en Provence depuis 7 ans.
(I have been living in Provence for 7 years.)
(I started living in Provence in the past, and I'm still living there in the present.)

For an explanation of the differences between the imparfait and the passé composé, move forward through the following seven pages...