The past perfect, or pluperfect, defines an event that happened prior to another event which happened in the past. Still a hazy idea? Read the examples for more clarity:
Yo ya me había despertado cuando sonó el despertador.
–I had already awakened when the alarm clock went off.
María ya había ido al teatro cuando Pedro la llamó.
–María had already gone to the theater when Pedro called her.
Nosotros habíamos vuelto a casa cuando empezó a nevar.
–We had gotten back home when it began to snow.