Das Plusquamperfekt
The Plusquamperfekt (PQP) is also called "die Vor.vergangen.heit" meaning "something that has happened before a point the past. I've also come across the term "Präteritum.perfekt" which is actually a lovely way to describe it as it is describing how the PQP is built:
1. Ich habe die Prüfung bestanden. (=Perfekt Tense)
---- I have the exam passed.
2. Ich hatte (=Präteritum) die Prüfung bestanden. (+Partizip Perfekt = PQP)
---- I had passed.
3. Ich bin nach Hause gekommen. (=Perfekt Tense)
---- I have to home come.
4. Ich war (=Präteritum) nach Hause gekommen. (+Partizip Perfekt = PQP)
---- I had (literally: was) come.
You won't really have to use the PQP very often unless you use the words "nachdem" or "bevor". But even then, in everyday life Germans tend to ignore the PQP and simply use the other past tenses. Berliners and people from the Rhineland use the PQP pretty frequently. But you don't have to worry about that as you are learning high German which is understood by all Germans.
It resembles the Past Perfect (e.g. I had eaten) of the English language a lot as you will see when you check the translations of the examples below:
5. Nachdem ich die Prüfung bestanden hatte, habe ich gefeiert.*
The passing of the exam happened before the celebration. Both events took place in the past. The passing is hence the pre-past and needs to be written in the PQP.
6. Nachdem ich nach Hause gekommen war, habe ich Essen gekocht*.
The coming home happened before the cooking. Again both events are in the past. The coming home needs to be written in the PQP.
*While you could use the Präteritum (i.e. feierte ich / kochte ich) for the 2nd half of the sentences above, it is not necessary 99% of the time. As the structure of the PQP is closer to the Perfekt tense, I strongly recommend you always use the combo: nachdem+PQP+Perfekt.
EVERYDAY USE
In daily life Germans very often prefer "als" over "nachdem". There's no difference in meaning between the two:
7. Nachdem/Als ich die Prüfung bestanden hatte, habe ich gefeiert.*
After/when I had passed my exam...
8. Nachdem/Als ich nach Hause gekommen war, habe ich Essen gekocht*.
After/when I had come home...
This topic is covered in: B2-L08