Final answer:
Hair graying is due to decreased activity of melanocytes, which produce less melanin as a person ages, leading to loss of hair color.
Step-by-step explanation:
Hair turns gray or white due to decreased melanocyte activity. Melanocytes are cells that produce melanin, the pigment responsible for hair color. As a person ages, there is a reduction in melanocyte activity, which leads to a decrease in melanin production and consequently, hair loses its color and becomes gray or white.