There are three types of hajj:
Tamatu',
Qiran,
and Ifrad.
Hajj al-tamatu' is the duty of people who live in a distance of 16 or 12 leagues (based on a disagreement in this regard) or further from Mecca. Hajj al-qiran and ifrad are the duty of the residents of Mecca and those who live within that distance.