The white stuff that comes out of your hair when you scrape it is likely sebum and dead skin cells. Sebum is a waxy substance produced by the sebaceous glands in your scalp. Its main function is to lubricate and protect your skin and hair. Dead skin cells are constantly shed from your scalp and can mix with sebum to form a sticky substance.

When you scratch or scrape your scalp, you may notice a buildup of this substance, which can appear white or yellowish in color. This buildup can be more pronounced in people with oily skin or hair, as the excess sebum can trap dead skin cells and other debris, leading to a buildup of gunk in the scalp.
While a small amount of sebum and dead skin cells on the scalp is normal and necessary for healthy hair, excessive buildup can lead to a variety of issues, including dandruff, scalp acne, and folliculitis.
Dandruff is a common condition characterized by flaky, itchy, and sometimes oily scalp. It is caused by a buildup of dead skin cells on the scalp, which can be exacerbated by overactive sebaceous glands. Dandruff can be treated with medicated shampoos that contain ingredients like salicylic acid, zinc pyrithione, or ketoconazole.
Scalp acne, also known as scalp folliculitis, is a condition characterized by small, red bumps on the scalp that may be itchy or tender to the touch. It is caused by an infection of the hair follicles, often as a result of bacteria or fungi. Scalp acne can be treated with topical or oral antibiotics, antifungal medications, or other topical treatments.
Folliculitis is a more severe form of scalp acne that is characterized by larger, deeper bumps that may be filled with pus. It can be caused by a variety of factors, including bacterial or fungal infections, ingrown hairs, or damage to the hair follicles. Treatment for folliculitis may involve antibiotics or other prescription medications, as well as home remedies like warm compresses or topical tea tree oil.
In addition to these conditions, excessive buildup of sebum and dead skin cells on the scalp can also lead to hair loss. When the hair follicles become clogged with debris, it can impede hair growth and lead to thinning or patchy hair. To prevent hair loss caused by a buildup of sebum and dead skin cells, it is important to maintain good scalp hygiene by washing your hair regularly with a gentle shampoo and avoiding harsh chemicals or styling products that can dry out the scalp.
Overall, while the white stuff that comes out of your hair when you scrape it is likely sebum and dead skin cells, excessive buildup of these substances can lead to a variety of scalp and hair issues. By maintaining good scalp hygiene and seeking treatment for any underlying conditions, you can help keep your scalp healthy and your hair looking its best.