Perfect tenses in English
The Perfect tenses in English are formed with a form of the auxiliary verb "have" and the past participle. They express the idea of something having been done before a given point in time. As many other languages don't have perfect tenses, this can be one of the most confusing aspects of English grammar for students and one of the most frustrating for teachers, especially native speakers.
Perfect tenses generally express an event prior to the main event.
Introductory examples 
Past Perfect: "By the time I found her, my sister had eaten all of the chocolate." (the action is finished before the sister is found)
Present Perfect: "I have never visited Turkey." (the action is finished before the moment of speech)
Future Perfect: "By this time next week, I will have finished my essay" (the action is finished before this time next week)
Each of these can also become Continuous in which case they (usually) express an action continuing until just before the main event. e.g. "My sister had been eating chocolate when I found her" (She stopped when she heard me coming)
"I have been playing tennis" (I am leaving the court as we speak)
"By the end of the month, I'll have been teaching for seven years." (This exact period will have ended)
Past Perfect 
Past perfect is generally used in two situations: 1. to indicate which of two past events occurred first 2. to indicate that an event occurred before a specific past time
Examples of #1: I had taken a shower before I ate breakfast. I ate breakfast after I had taken a shower. I had taken a shower before my breakfast. Before my breakfast, I had taken a shower.
In these examples, the past perfect indicates that there were two past events, taking a shower and eating breakfast, but the shower occurred first. The second event, if using a verb, is always in simple past tense.
Examples of #2: I had taken a shower before 8:00 am. I had taken a shower by 8:00 am. By 8:00 am, I had taken a shower.
In these examples, the past perfect indicates that the event, taking a shower, occurred before a specific time in the past, 8:00 am. The specific time can be any time marker such as the time, day, date, month, year.
Present Perfect 
Present perfect is generally used in two situations: 1. past events that occurred at unknown or unimportant times (in contrast with simple past tense which generally describes events occurring at known past time frames) - in this situation, frequently used in conjunction with the adverbs ever, never, already, yet, still to indicate whether something has been accomplished or completed before the present moment 2. past events that have occurred on multiple occasions
Examples of #1: She has already eaten her breakfast. (action completed before the present moment, used with "already", no specific time known) They have gone to the market. (unknown time, but action completed before the present moment)
Examples of #2: We have been to Paris three times. I have read five books in the past year.
Present Perfect v. Simple Past 
In general, both the present perfect and the simple past are used to describe past events. The present perfect is used as described above whereas the simple past is used when a specific time frame is known or when describing a series of events (as in a story). Further, the simple past is used to describe events that were completed in the defined past (present perfect can include events that occurred anytime up to the present moment).
Examples: Simple Past: Last weekend, Tom and I went to Los Angeles and saw the Lakers play at the Staples Center. (specific time frame, series of events) Simple Past: Did you eat this morning? (specific time frame) Present Perfect: Have you eaten yet? (nonspecific time frame, used with "yet") Present Perfect: Tom and I have been to LA for the past 3 weekends. (multiple occurrences of an event, occurring before the present moment)
Note: if you are describing a multiple occurrence that was completed in a specific time frame in the past, you will use simple past tense. Example: Tom and I went to LA 3 times last month.
Advice for native speakers 
Think about it 
Grammar books can be useful but often no amount of swotting up on the official "rules" of the English language will give you the full understanding required to field those awkward questions. It may be more useful to sit and think for half an hour. Ask yourself, "Why do I use this grammar?".