When the past perfect tense is used in a sentence, what does it tell you? When the present perfect tense is used, what does it tell you?
Past Perfect tense is used to indicate which of 2 past events took place earlier.
John had done his homework before he went out to play football.
In this sentence two past events are mentioned. The one expressed in Past Perfect tense (had done) is earlier than the one expressed in Past Simple tense (went out).
Note: It is not always necessary to use Past Perfect. The sentence would have the same meaning if I wrote both parts in Past Simple. The word "before" clearly indicates the order of events, but using Past Perfect may make the sentence even clearer.
Present Perfect tense is used to indicate a past event which has influence on present.
Let's compare 2 sentences informing about the same past event:
I lost a key.
I have lost a key.
The first sentence (in Past Simple) tells us only about past event. We do not know if the person who said it found the key later or is it still lost.
The second sentence (in Present Perfect) tells us that the past event (loosing the key) has influence on presence so we know that the person still does not have the key.