Used to show that something happened before something else.
Example:
John had gone out when I arrived in the office.
I had saved my document before the computer crashed.
When they arrived we had already started cooking.
He was very tired because he hadn't slept well.