Below you can find some exercises related to the contrast between the past perfect and the simple past. Do them and if you have any questions, let me know. (Remember there are some other posts that have to do only with the past perfect and only with the simple. Here you are going to practise them together).
If you need to know when to use the Past Perfect, I recommend you to have a look at this page by the British Council. You can do the exercises that follow.
Here you also have another explanation with several timelines and some exercises.