In this tense, the auxiliary verb “haber” is put into its’ imperfect form and the past participle is added. It refers to an action that happened further back in the past.

yo había hablado
I had talked
habías hablado
you had talked
él/ella/usted había hablado
he/she/you had talked
nosotros habíamos hablado
we had talked
vosotros habíais hablado
you had talked
ellos/ellas/ustedes habían hablado
they/you had talked
yo había servido
I had served
habías servido
you had served
él/ella/usted había servido
he/she/you had served
nosotros habíamos servido
we had served
vosotros habíais servido
you had served
ellos/ellas/ustedes habían servido
they/you had served

Ya te habías ido cuando llego a verme. (You had already left when he/she came to see me.)