Every hair follicle contains pigment cells called melanocytes. The melanocytes produce eumelanin, which is black or dark brown, and pheomelanin, which is reddish-yellow, and pass the melanin to the cells which produce keratin, the chief protein in hair. When the keratin-producing cells (keratinocytes) die, they retain the coloring from the melanin. When you first start to go gray, the melanocytes are still present, but they become less active. Less pigment is deposited into the hair so it appears lighter. As graying progresses, the melanocytes die off until there aren’t any cells left to produce the color.
While this is a normal and unavoidable part of the aging process and is not of itself associated with disease, some autoimmune diseases can cause premature graying. However, some people start going gray in their 20s and are perfectly healthy. Extreme shock or stress can also cause your hair to go gray very quickly, though not overnight.