One of the thirty-nine forbidden works on Shabbat is shearing. This refers to detaching anything attached to any living creature, such as shearing wool from sheep or cutting hair or nails off of a human being. These laws are discussed in Shulchan Aruch Chapter 340.
The Prohibition to Pluck Hair
The Torah prohibition to pluck hair on Shabbat applies only when this is done by means of a vessel, such as scissors. However, plucking hair out by hand is merely a rabbinic prohibition.
Thus, one may not cut one’s hair on Shabbat, whether this is done with a vessel or by hand. One may likewise not use any creams or foams meant to remove hair on Shabbat. There is no distinction between hair on the head, arm, or any other area of the body for that matter. (See Yabia Omer, Volume 4, Chapter 34, Section 18)
Scratching One’s Head or Beard
Hagaon Rabbeinu Yosef Haim zt”l writes in his Ben Ish Hai (Parashat Ki Tisa, Year 2) that one should avoid excessive scratching of the beard on Shabbat, for this will certainly lead to plucking out hairs. Similarly, women who have long hair should avoid excessive scratching of the scalp, for this will almost certainly lead to plucking out hairs.
Rabbeinu Ha’Ari z”l would avoid touching his beard on Shabbat altogether so that he would not inadvertently come to pluck out a hair as is common on weekdays. Once, he accidentally touched his beard on Shabbat and he did not remove his hand from his beard until Shabbat concluded (Ru’ach Chaim, Chapter 340). Indeed, the great luminary of our generation, Hagaon Harav Aharon Yehuda Leib Shteinman zt”l had a similar practice whereby he trained himself not to touch his beard even on weekdays lest he touch his beard on Shabbat and transgress the prohibition of plucking out hairs.
Checking the Head for Lice on Shabbat
Maran Rabbeinu Ovadia Yosef zt”l writes (Halichot Olam, Volume 4, page 20) that although plucking hairs is forbidden on Shabbat, one may nevertheless check children’s heads for lice on Shabbat. Although doing so may inadvertently lead to plucking out hair, this is still permissible since this plucking is being done by hand (a rabbinic prohibition) and one does not intend for this to happen at all. (An unintended direct causation regarding rabbinic prohibitions on Shabbat is permissible.)
Maran zt”l adds that if one has a bandage stuck to one’s skin and needs to remove it on Shabbat, one may do so even if this may cause some hairs to be plucked out, for plucking in this manner is only a rabbinic prohibition and one removing a bandage does not intend for hairs to be plucked out. There is therefore room for leniency in this regard.