I don't really understand plus-que-parfait.
When do we use plus-que-parfait?
And if you compare it with English, what tense is that?
The comparison to English is the past perfect tense. This is the tense that we use when we're already talking about the past, and we want to describe an event that occured before the time we're talking about. It's always formed with "had + participle," although "had" contracts to 'd in most contexts in spoken English.
I told her that I'd done it.
Je lui ai dit que je l'avais fait.
Or with être verbs:
When you got there, she had already left.
Quand tu y es arrivé, elle était déjà partie.
In general you won't be misunderstood if you just always translate past perfect with plus-que-parfait and vice versa.
There are some subtle differences between English and French, though. I am not a native French speaker, so you should take these three points with a grain of salt.
J'avais vu des fantômes.
could translate to either
I had seen ghosts.
I had been seeing ghosts.
J'habite à Paris depuis deux ans.
I have lived in Paris for two years.
J'habitais à Paris depuis deux ans.
I'd been living in Paris for two years.
Why did you do that?
Because I noticed that you needed it.
In English, "I'd noticed" would sound stilted here, although not exactly wrong. But in French, it's more natural:
Pour quoi tu as fait ça ?
Parce que j'avais remarqué que tu en avais besoin.