The past perfect is "the past before a past". You can use it to talk about an action that ...
The past perfect is "the past before a past". You can use it to talk about an action that happened before another action in the past. It is formed:
Had + past participle
I had worked in Vigo for ten months before I moved to Madrid.
I hadn't worked in Vigo before I moved to Madrid.
Had you worked in Vigo before you moved to Madrid?
Imagine you are late to class on the day of an important exam. The class started at 9:00 and you arrived at 9:10. You can use the past perfect to say:
The class had already started by the time I arrived.
It is common to use the short form of had 'd
When I checked my phone, I saw that she'd called me twice.
By the end of the day I'd studied for five hours.
It is common to use these expressions to express a past situation with the past perfect:
By the time
I had done my homework by the time you called.
When
When we arrived at the school, the exam had already started.
Before
Before she sold the house, she had owned it for ten years.
After
Had the teacher arrived before the students did?
Until
They had never met a native English teacher, until they met Kasey.