The past perfect is used to describe a past action that happened before another past action.It expresses the anteriority of a past action, compared to another past action expressed by the simple past, the present perfect, the preterite...
You use the auxiliaries HAVE or BE at l'imparfait + past participle of the verb.