It is made with the auxiliary verb had + past participle (which is different for regular and irregular verbs: -ed ending for regular verbs, e.g. worked, travelled, tried, different forms for irregular verbs, e.g. written, made, sung).
Positive statement: I had travelled, He had done.
Negative statement: I had not done (I hadn't done)
Question form: Had I done?
Negative question: Had I not done? (Hadn't I done?)
See also how to make the past perfect in the passive voice.
1. We use the past perfect simple tense to make it clear that an event was completed before another event..
The door bell rang at last. I had been in the room since breakfast. (The bell rang at noon. I came in the morning - before that.)
When I arrived there Sarah had already left. (I arrived after lunch. Sara went home before lunch.)
I was so hungry! I had not eaten anything since the morning. (It was late at night.)
2. It is used to refer to activities that were completed before a point of time.
In 2005 I had lived in the same place for ten years. Had you ever travelled by plane before your holiday in Spain?
1. The past perfect tense is often used with expressions indicating that some activities took some time, such as: for 10 years, since 1995, all week, all the time, always ... These activities began before a point of time (or another action) and continued to that point.
When the plane landed Tim had travelled all day.
My parents moved away from Leeds. They had lived there since they got married.
In 2005 Derek started to work in Berlin. He had always planned it.
These expressions are also used with the present perfect, which refers, however, to activities that started in the past and still continue.
I have been in Paris for a week. (I came a week ago and I am still in Paris.)
When I met Annie I had been in Paris for a week. (I came to Paris a week before I met Annie and I am not there anymore.)
2. We also use the past perfect tense for an action that ended a long time before the point of time that we refer to.
In 2001 Angie worked in Glasgow. In 1980's she had worked in Wales. (Angie left her job in Glasgow in 1989. In 2001 she worked in Glasgow. But we do not know what she did in the meantime.)
1. The past simple is used for activities that happened some time ago. The past perfect simple is used for events that happened before a point of time in the past.
Jim returned at 4 o'clock. He had called Jane on the way back home and now she appeared at the door.
In this story the sentences are in a reversed order, because in reality, first Jim called Jane and then he returned. If we want to keep this sentence order, we must use the past perfect tense to make it clear that Jim called Jane first.
2. If the sentence order is the same as the order of the activities, we can use the past simple.
Jim called Jane on the way back home. He returned at 4 o'clock and now she appeared at the door.
This difference is important. In some situations these two tenses have a completely different meaning.
I arrived at the garage. They told me to pay in cash. But I only had my credit card. I couldn't pay.
I arrived at the garage. They had told me to pay in cash. I paid and left immediately.
In the first case I did not know that I had to pay in cash. They told me after my arrival.
In the second case I was informed before my arrival and had no problems.
In time clauses
In time clauses after when we use the past simple if we want to say that the first activity led to the second and that the second followed the first very closely.
When the film ended he switched off the television.
The perfect form is used when we want to make it clear that the first event was completed before the second started and that there is no relation between them.
When she had washed the dishes she had a cup of tea.
But: When she washed the dishes she put the plates in the cupboard.
If we use after in a time clause the perfect is much more usual.
After Zidane had scored the goal the fans went wild.
We use this tense similarly with: as soon as, until, before, by the time.
He got up as soon as he had heard the alarm clock. We did not stop until we had reached the coast. Maria had finished her meal by the time I arrived.
The past perfect continuous tense is made with the auxiliaries had been + present participle (-ing ending, e.g. working, trying, writing, singing ... )
Positive statement: I had been doing.
Negative statement: I had not been doing.
Question form: Had I been doing?
Negative question: Had I not been doing?
It is used for activities that began before a point of time and were still continuing at that point of time.
Last summer Josh had been renovating his house for two years. (He started three years ago and last summer he was still renovating his house.)
The past perfect continous and the present perfect continuous are basically very similar. The difference is, however, that in the present perfect we refer to the present times.
I have been practising since the morning. (I am still practising.)
At 11 o'clock I had been practising for two hours. (I began at 9 o'clock and at 11 o'clock I was still practising.)
The past perfect simple vs past perfect continuous
For activities that can continue for a long time we can use both the simple and continuous (work, run, study, travel, sleep ...). There is practically no difference in meaning, but the continuous is more usual in English.
Stephen was pretty tired. He had worked all day.
Stephen was pretty tired. He had been working all day.
In other cases these two forms have a completely different meaning.
Before midnight Paul had translated the article. (He finished his work.)
Before midnight Paul had been translating the article. (He did not finish it. He was still translating at that moment.)
If we refer to a number of individual events or events that were repeated, we must use the simple.
Before the lesson ended they had written three tests. (three individual completed activities)
But: It was exhausting. They had been writing tests since the lessons started. (one uninterrupted incomplete activity)
Try some past perfect exercises to understand the difference between these tenses.