Fiqh-us-Sunnah Volume 5, Hajj and ‘Umrah, Fiqh 5.115A.
The practice of shaving or clipping hair is affirmed by the Qur’an, the Sunnah of the Prophet, and the consensus of the community. Says Allah: “Truly did Allah fulfil the vision for His Messenger: ye shall enter the Sacred Mosque, if Allah wills, with minds secure, heads shaved, hair cut short, and without fear.” (Qur’an 48.27)
Both Bukhari and Muslim have reported that the Prophet (peace be upon him) said, “May Allah bless those who shaved.” The Companions asked him, “O Allah’s Messenger, what about those who clip their hair short?” Thereupon the Prophet (peace be upon him) again said, “May Allah bless those who shaved.” They repeated their question the third time, and again the Prophet said, “May Allah bless those who shaved.” When they asked him for the fourth time, “O Allah’s Messenger, what about those who clip their hair short?” He said, “And (may Allah bless) those who clip their hair short. (It is said that the reason for repeating supplication for those who shaved their hair is obviously to encourage people to shave rather than cut their hair short only because by shaving off one’s hair one demonstrates one’s sincerity and humility to Allah without caring for one’s physical appearance)
Both Bukhari and Muslim also report that the Prophet (peace be upon him) shaved his head, and so did a group of his Companions, while others only cut their hair short.
Shaving here means removing hair of the head with a razor, etc., or plucking them out. It suffices one, however, to remove only as many as three hairs. And cutting the hair short means cutting the length of one fingertip of the head’s hair. The majority of jurists disagree concerning this issue.
Most scholars hold that shaving or cutting the hair short is obligatory, and one failing to do so must slaughter an animal to atone for this omission. According to the Shafi’i school it is an integral part of Hajj.