Generally, the perfect tells you what has happened, what have you done in the recent past.
It is made up of the present tense of haber (called the auxiliary verb) and the past participle. Past participles of -ar verbs end in -ado, and -er and -ir verbs end in -ido.
Two little rules to bear in mind though:
- you don't use the perfect to say how long you have been doing something, you use the present.
'hace tres meses que aprendemos castellano'
'we've been learning Spanish for three months'
- to say you have just done something, you use the present of acabar de+infinitive.
'el tren acaba de salir'
'the train has just left'