We use the past perfect simple to talk about what happened before another action in the past.
Completed Action Before Something in the Past

Remember!
Subject + had + past participle
Subject + hadn't + past participle
Had + subject + past participle ?
Now do the following exercises from Adele's Esl Corner.
Exercise 1
Exercise 2
Exercise 3
Exercise 4 (from www.esl-classroom.com)
On the link below you will be able to read about the difference in use between the Past Perfect and the Past Simple and you will find some exercises.
Past Perfect or Past Simple?
Now decide if you have to use the Past Perfect or the Past Simple?
Past Perfect or Past Simple (from www.autoenglish.org)