Grammar
Passé composé or imparfait: which past tense to use
English moves fairly freely between « I did » and « I was doing ». French makes the same distinction, but grammatically rather than optionally, and the choice is rarely free.
The event and the background
The passé composé reports a completed event that moves the story on. The imparfait sets the scene: what was going on, what used to happen, what was true around it.
Il pleuvait quand je suis sorti.
It was raining when I went out.
Tous les étés, nous allions à la mer.
Every summer we used to go to the sea.
Avoir or être
Most verbs take avoir. A short set of verbs of movement and change of state takes être, and so do all reflexive verbs.
J'ai mangé au restaurant.
I ate at the restaurant.
Elle est arrivée à midi.
She arrived at noon.
Agreement of the participle
With être, the participle agrees with the subject. With avoir it does not, unless the direct object comes before the verb.
Elles sont parties tôt.
They (feminine) left early.
La lettre que j'ai écrite est partie.
The letter I wrote has been sent.