Past perfect simple
When? When we need to make it clear that one action happened before another action in the past.
How? had + past participle
Example: She had seen that film before
Past Perfect Continuous
When? to talk about situations/ activities that started in the past and were still continuing at another time in the past
How? Had been + verb (ing)
Example: I hadn't been listening