When forming the perfect tense in German, you need to use either the verb "haben" or "sein" as an auxiliary verb, along with the past participle of the verb in question.
"Sein" is mainly used when there is an action from A to B involved. For example: Jan ist von München nach Hamburg gefahren. Jan has travelled from Munich to Hamburg. The action here being that Jan has travelled from Munich (A) to Hamburg (B).
"Haben" is consequently normally used with verbs that do not involve an action, rather a noun in the accusative case. For example: Jan hat den Apfel gekauft. Jan bought the apple. Here there is no movement from A to B, but there is an accusative object, the apple. Therefore "haben" is used.