The
Spanish pretérito plusquamperfecto is identical
with the English past perfect. The rule is to use the
plusquamperfecto when an action happened in the past
before another action in the past.
Se
había quebrado una pierna y por eso
no podía ir a la escuela. = He had broken a leg,
therefore he couldn't come to school.