The most important verb when using the perfect tense in Spanish is 'haber'.
There is no immediate translation to English, but in this context it roughly means 'to have' (not to be confused with 'tener'!)
This is conjugated as follows:
I - he
You - has
He/she/it - ha
We - hemos
You (plural) - habéis
They - han
Next, we must add the action that has been done. In order to do this, we must take the relevant verb and find its past participle.
For example, if we wanted to say 'I have bought a coat', we would have to take the verb 'to buy' (comprar) and find the past participle ('bought').
For the majority of verbs there is a very simple trick:
-ar verbs
With -ar verbs, the trick is to remove the -ar ending and replace it with 'ado'.
'Comprar' thus becomes 'comprado', 'jugar' becomes 'jugado', and so on.
If we now bring everything together, we can work out how to form the above sentence:
He (I have) comprado (bought) un abrigo (a coat).
-er and -ir verbs
The trick is very similar for -er and -ir verbs. Let's use 'comer' as an example.
Similarly to -ar verbs, remove the -er ending, but this time replace it with 'ido'. 'Comer' thus becomes 'comido'.
-ir verbs also follow this pattern.
Examples
They have gone out - Han salido (salido = past participle of 'salir')
I have learnt - He aprendido (aprender)
We have spoken - Hemos hablado (hablar)
Exceptions
Unfortunately however, not all verbs follow this pattern. There are some exceptions which just have to be remembered. These are irregular.
Common irregulars:
Abrir (to open) - abierto
Decir (to say) - dicho
Escribir (to write) - escrito
Hacer (to do/make) - hecho
Ver (to see) - visto
Examples:
He has opened the window - Ha abierto la ventana
I have written - He escrito
They have done their homework - Han hecho sus deberes
We have seen the sky - Hemos visto el cielo
Just remember the formula:
'Haber' + Past Participle
Hope this helps!