It’s very simple. Pretérito pluscuamperfecto is the past of the past. When we talk about a story happened in the past and make reference to another that happened before … We use Pretérito pluscuamperfecto! As you already know the irregular participles it is very easy! Combine the auxiliary verb HABER in Pretérito imperfecto.
When you started studying Spanish, had you visited any Spanish-speaking country before?
Answer in the comments! (In Spanish!)