The past perfect expresses that an action occurred before a specific point in time in the past. When you are telling a story about the past and want to mention something that happened before that, use the past perfect.
Luckily for you, it is used the same way as in English (i.e. "Before I moved to Germany, I had already started learning German" or "At 6 pm, I had already arrived at the party")
The past perfect is also called the Plusquamperfekt or Vorvergangenheit.
The past perfect is constructed with "sein" or "haben" (conjugated in the simple past) + the past participle.
Choose between "sein" and "haben" like you would for the perfect tense: for movements from A to B, changes of state, and the verbs "sein," "werden," and "bleiben," use "sein" as the helping verb.
For everything else, and all reflexive verbs, use "haben" as the helping verb.
There are certain words that signal you to use the past perfect:
When speaking informally, many people (including native speakers!) use the perfect or simple past instead. It is grammatically incorrect, but still very common.
Correct: „Er hat das Rennen gewonnen. Er hatte vorher viel trainiert.“
Common (but wrong): „Er hat das Rennen gewonnen. Er hat vorher viel trainiert.“
So don't worry too much about it if you hear your German friends or colleagues using the other form. But if you're taking an exam, make sure to use the past perfect!
Talking about the present: The Simple Present.
When using verbs, word order is important: Main Clauses
Some verbs have to separated when you conjugate them: Separable Verbs.
Learn about modal verbs and what's so special about them: Modal Verbs.
Some verbs are always followed by a specific case: Verbs with Complements.