How the Imperfect past tense is used

The Imperfect is used to paint a background for a story.  We use the Imperfect for:
1) Age
Tenía 12 años cuando robé el primer carro. I was 12 when I stole my first car.
2) Weather
Hacía buen tiempo cuando me arrestaron. It was nice weather when they arrested me.
3) Emotional States
Mi amigo estaba nervioso porque era la medianoche. My friend was nervous because it was the middle of the night.
Se puso nervioso He became nervous.
4) What people were doing WHEN something else occured:
Me duchaba cuando sonó el teléfono. I was showering when the phone rang.
5) Habitual Past actions
íbamos a la playa cada verano. We went [used to go] to the beach every summer.
6) Time
Eran las nueve de la noche. It was nine o'clock at night.
Words that are hints for using Imperfect:
Siempre                       Cada (año, día...)                         Usualmente                                  Generalmente
Normalmente                En general                                 En el pasado...
When people "set a scene" describing what they were doing, what time it was, or what was going on around them at the time of a crime, they will use the Imperfect.  For example, if you are about to tell a friend what happened to you in the mall yesterday, you will begin by first describing the scene:  where you were, what was going on around you, what people were in the middle of doing.  This is all described in the Imperfect.  When you begin to tell all of the exciting (or frustrating) things which proceeded to happen, you will tell it in the Preterite.