Light is selectively absorbed by melanin, the pigment in the hair follicle. The light energy heats the pigment and selectively destroys the hair follicle without damaging the surrounding cells.