The three debts (as already said in the other answers) are: Deva Rina, Rishi Rina and Pitru Rina.
Manu Smriti 4.257. When he has paid, according to the law, his debts
to the great sages, to the manes, and to the gods, let him make over
everything to his son and dwell (in his house), not caring for any
The method of clearing these debts is performing Deva, Pitri and Rishi Tarpana/Yajna:
Manu Smriti 3.81. Let him worship, according to the rule, the sages
by the private recitation of the Veda, the gods by burnt oblations,
the manes by funeral offerings (Sraddha), men by (gifts of) food,
and the Bhutas by the Bali offering.
It is stated: ‘A Brahmin is born carrying three debts––of sacrifice to
the gods, of offspring to the ancestors, and of studentship to the
seers. That man is free from debts who has offered a sacrifice,
fathered a son, and lived as a student’ (cf. TS 220.127.116.11) - Vashishta
This verse 3.81 is actually talking about the Pancha Maha Yajnas (the five great sacrifices).
If the person has a daughter and no sons then also there is a way for him. He has to make his daughter an "appointed daughter". This method was employed by Prajapati Daksha.
So, now, instead of the son, the sons of his daughters are qualified to perform his funeral rites. So, even now he gets freedom from the debt that he has to his ancestors.
See the following verses from Manu Smriti:
9.127. He who has no son may make his daughter in the following manner an appointed daughter (putrika, saying to her husband), ’The (male)
child, born of her, shall perform my funeral rites.
9.128. According to this rule Daksha, himself, lord of created beings, formerly made (all his female offspring) appointed daughters in order
to multiply his race.
9.129. He gave ten to Dharma, thirteen to Kasyapa, twenty-seven to King Soma, honouring (them) with an affectionate heart