The Past Perfect Tense is a past tense meaning I had done something. It is formed by using the past tense of the verb HABER (to have done something) + Past Participle.
The Past Participle is formed by removing the AR from the infinitive and adding ADO e.g. Había hablado – I had spoken.
The Past Participle is formed by removing the ER or IR from the infinitive and adding IDO e.g. Había comido – I had eaten.