The word Hajj, linguistically, means heading to a place for the sake of visiting; in Islamic terminology, it implies heading to Makkah to observe the rituals of pilgrimage.

Hajj is obligated by Allaah upon every Muslim, male and female, who is physically and financially capable. It is obligatory only once during the lifetime of a Muslim. Allaah Almighty Says (what means): “…And [due] to Allaah from the people is a pilgrimage to the House – for whoever is able to find thereto a way….”[Quran 3:97]

The Prophet  sallallaahu  `alayhi  wa  sallam ( may  Allaah exalt his mention ) said: “Islam is built upon five (pillars): the testimony that none has the right to be worshipped except Allaah and Muhammad is the Messenger of Allaah, the establishment of the prayer, paying Zakaat, Hajj to the House (i.e. Ka’bah,) and fasting in Ramadan.” [Al-Bukhaari & Muslim]
The Prophet  sallallaahu  `alayhi  wa  sallam ( may  Allaah exalt his mention ) also said: “Hajj is mandated once, so whoever does it more (than that), then it is supererogatory.” [Abu Daawood and Ahmad]
Hajj was prescribed in the sixth year after Hijrah (migration) upon the revelation of the following verse in which Allaah Says (what means): “And complete the Hajj and ‘Umrah for Allaah...”[Quran 2:196]
Hajj is not a new institution introduced by Islam, rather it is as old as the Ka'bah itself. Allaah Almighty Says (what means): "Indeed, the first House [of worship] established for mankind was that at Bakkah [i.e., Makkah] – blessed and a guidance to the worlds.” [Quran 3:96]
The whole origin of Hajj is rooted to the acts of devotion of Prophet Ibraaheem  may  Allaah  exalt  his  mention. This demonstrates that Muhammad  sallallaahu  `alayhi  wa  sallam ( may  Allaah exalt his mention ) did not innovate this institution, all he did was to clear it of all the evil practices that had crept into it. After a few centuries of the death of Ibraaheem and his son Ismaa’eel, may Allaah exalt their mention, people abandoned their teachings and gradually went astray, like all other people around them. Hundreds of idols were installed in the Ka’bah, which was built by Ibraaheem and Ismaa’eel, may Allaah exalt their mention, as a centre for the worship of the One True God. Ironically enough, idols were made after the image of Ibraaheem and Ismaa’eel too, whose whole lives had been spent eradicating idol-worship. The descendants of Ibraaheem  may  Allaah  exalt  his  mention who had himself repudiated all idols, began to worship idols. The Ka’bah was turned into a type of temple for idol-worship and superstition. This predicament lasted for about two thousand years, until the advent of Prophet Muhammad  sallallaahu  `alayhi  wa  sallam ( may  Allaah exalt his mention ).
Hajj is rightly said to be the perfection of faith, since it combines in itself all the distinctive qualities of other obligatory acts of prayer, patience, privation of amenities of life, devotion, Zakaat (alms), slaughtering the sacrifice and supplication. In fact, the physical pilgrimage is a prelude to the spiritual pilgrimage to Allaah when man would bid goodbye to everything of the world and present himself before Him as His humble servant saying: 'Here I am before You, my Lord, as a slave.'