The past perfect describes an action that happened before another past action. It is the tense of "the past of the past". Together with the past simple, it gives clear chronological order to a narrative.
Note: the past perfect form is the same for all persons (I, you, he, she, we, they). Only "had" + V3.
For the later action (the main event).
I arrived at school. (later action)
For the earlier action (before).
The bell had already rung. (earlier action)
When I arrived at school, the bell had already rung.
These words often signal that the past perfect is needed:
had + V3 — same for I, you, he, she, we, they.
Past perfect = an action before another past action. Past simple = the later action.
already, just, yet, before, after, by the time, when. They signal the past perfect.
The past perfect is regularly tested in the "put the verb in the correct tense" exercise. Always look at the time relation: if there are two past events, the earlier one takes the past perfect.