Past Perfect shows something happened BEFORE another past action. It's the past of the past. Use it to sequence events clearly in narratives.
Practice tip: Look for TWO past actions. First one = Past Perfect (had done). Second one = Past Simple (did).