present perfect  |   have worked |
  past perfect |   had worked |
  future perfect |   shall have worked |
The present perfect refers to action that began in the past and continues into the present.
They have worked on that project for three months. (They began three months ago, and they are still working on it.)
The past perfect refers to a past action that took place prior to another past action.
Before they began the project, they had spent almost two months just getting organized. (The later action (began) is in the simple past. The earlier action (had spent) is in the past perfect.)
The future perfect indicates action that began in the past and is expected to continue into the future.
Before it is over, they will have spent a year just deciding what color to paint the office. (The action of deciding began in the past and is expected to go on into the future.)
The difficulty people sometimes have with the perfect tenses is a failure to use the past perfect where it is called for.
INCORRECT: When Marilyn checked the report, she found that John forgot the sales figures. (The first two actions, the checking and the finding, took place simultaneously. The third action, the forgetting, must have taken place earlier. The simple past tense for all of these actions creates possible confusion.)
CORRECTED: When Marilyn checked the report, she found that John had forgotten the sales figures. (The use of the past perfect for the third action shows more clearly that the forgetting occurred before the checking and the finding.)