After Muzdalifah and Mina men shave their heads or trim their hair. This may bed one before throwing the pebbles at Jamratul-^Aqabah. The time for shaving the head or trimming the hair starts by (after) the middle of the ^Id eve.
However, it is sunnah to shave or cut on the day of the ^Id. It is better to do it after sunrise and before performing the integral of tawaf and sa^y.
Before that time, it is prohibited for those performing Hajj to remove even one hair from their bodies. (See Prohibitions.) The least of the obligation of shaving the head or trimming the hair is to shave or trim three hairs from the head. It is sunnah for the bald man to run the razor over his head.
For the man, shaving the whole head is better than just cutting the hair. This is known from the hadith of the Prophet related by al-Bukhariyy.
When the Prophet made du^a’ that Allah forgive those who shave their heads in the Hajj, some people asked, “What about those who just trim their hair?” The Prophet again made du^a’ for those who shave their heads. Twice again they asked, “What about those who trim their hair?” Then the Prophet made du^a’ for both those who shave and those who trim their hair.
The woman does not shave her head, rather she trims her hair. It is sunnah that she cuts from all sides of her head.