To talk about an action that took place before another past action
Example 1
The boy was late. The family hadstarted when he got to the cinema.
Purpose of using past perfect
To make the order of past actions clear
Example 2
When Sally arrived at the cafe, Josh had already left.
Although there are no time phrases, the use of past perfect was able to tell us the order in which things happened
When there are time phrases (e.g. before, after), we can choose to use both simplepast and pastperfect since the time phrase already made the order clear
Example 3
After he finished/hadfinished his homework, he went to bed. Both are okay.
When telling a series of past actions, we use simple past
Example 4
He entered the room, turned on the TV and sat on the sofa.
We don't use past perfect to talk about a single action, but if the order is clear, pastperfect is okay