The perfect tenses are formed by using the auxiliary verb to have and adding the past participle of the main verb. Thus, the past perfect is formed by taking the past tense of to have (had) and adding the past participle of the main verb. Thus:
When I arrived at her house, she had finished dinner.
The past perfect is also called the pluperfect tense. Be very careful when using the past perfect. Many writers use the past perfect when they actually mean just the past tense.
The past perfect shows what’s called the remote past. Once you’ve established a time period (when I arrived at the house), the past perfect then backs up the time to a past within a past (she had finished dinner).
The past-perfect tense often appears in “indirect speech.” If a person says, “I have decided to retire,” then you can quote that person directly by writing:
He said, “I have decided to retire.”
But if you wanted to refer to that statement indirectly, you would write:
He said that he had decided to retire.