[General Notes] [Present Perfect] [Pluperfect] [Future Perfect Tenses] [Conditional Perfect] [Other Perfect Tenses]

Use perfect tenses in order to emphasize relevance of an action/event which took place (or will have taken place) to another action/event. Spanish perfect tenses are quite similar in this sense to English ones, although for example, in English Present Perfect has become a dominant tense when tallking about the past, while that is not the case in Spanish, where Imperfect and Preterite are commonly used.
To form perfect tenses use haber + past participle. See conjugation of haber.
For formation of past participle see conjugation of regular, irregular and stem-changing verbs. 
Use the present perfect when discussing events that have taken place in the past but are relevant to the present or past events that may be repeated or continued in the future. One often uses ya (already,yet) in questions and affirmative sentences while todavía (still, yet) in negative ones with the present perfect:
-¿Quieres ver Mujeres al borde de un attaque de nervios
- No. Ya he visto esa película cuatro veces. 
-¿Ya has comido
- No, no he comido nada todavía.

Note that English construction I have just finished doing it is being translated using verb acabar -- Yo acabo de hacerlo.

To form the present perfect use haber and a past participle.

he
has
ha
hemos
habéis
han
+ past participle

Use the pluperfect (pluscuamperfecto) when referring to an action that preceded another action in the past. This tense is identical to the past perfect in English:
Lief Ericson ya había visitado America cuando llegó Colón.

To form the pluperfect use the imperfect of haber and a past participle.

había
habías
había
habíamos
habíais
habían
+ past participle

One can use the future perfect and the future perfect progressive to make certain emphasizes although it rarely happens. For example
Yo veré. I will look. Sometime, for sometime. Simple Future
Yo estaré viendo.  I will be looking.  Continued process  Future Progressive
Yo habré visto.  I will have looked.  By the time you arrive.  Future Perfect
Yo habré estado viendo.  I will have been looking.  Continued process by the time you arrive. Future Perfect Progressive

To form the future perfect use the future of haber and a past participle or estado and present participle

habré 
habrás 
habrá
habremos 
habréis
habrán
+ past participle 
or 
+ estado + present participle

Use the conditional perfect (it exactly corresponds to Future in the Past Perfect in English) when discussing situations in the past which are contrary to the fact (3rd type of conditional sentences), i.e. when talking about something that would have happened:
Si hubiera ido a la fiesta, habría visto a Isabel.
If I had gone to the party, I would have seen Isabel.
Yo le habría hablado a mi hermano.
I would have talked to my brother.
To form the conditional perfect, use
habría
habrías
habría
habríamos
habríais
habrían
+ past participle

For formation of past participle see conjugation of regular, irregular and stem-changing verbs. 


One can also form other perfect tenses. Some of them are discussed elsewhere, like Present Perfect Subjunctive and Pluperfect Subjunctive. Some of them may exist theoretically like Present Perfect Progressive or Conditional Perfect Progressive but in reality they are hardly used. For when they should be used, see the rules for the "paternal" tense.
Also some textbooks mention Preterit Perfect (Antefuturo) although I do not think it is used at all. Just for the sake of it, here is conjugation of hablar:
Preterit Perfect
Conditional Perfect Progressive
hube hablado
hubiste hablado
hubo hablado
hubimos hablado
hubisteis hablado
hubieron hablado
habría estado hablando
habrías estado hablando
habría estado hablando
habríamos estado hablando
habríais estado hablando
habrían estado hablando