There are many different reasons why hair turns gray, but the primary cause is genetics. Each of the hair follicles, where hair is produced, contains cells called melanocytes. These melanocytes produce the melanin needed to color hair; they gradually die in time so that hair will receive less melanin, according to KidsHealth.
Melanin, the same chemical that determines the color of the host's skin, is required to color the hair and, as the cells die, the lower melanin levels in the hair will cause it to become less opaque and become white, gray or silver. Generally, Caucasians' hair will start to go gray during their 30s, those from Asia will start to go gray in their late 30s and African-Americans' hair will start to go gray in their mid-40s. People whose parents and grandparents had gray hair during their youth are also prone to turn gray prematurely. There are, however, medical issues that can cause someone to turn gray at an early age.
A lack of vitamin B-12 or problems with the thyroid or pituitary glands can cause premature graying, however, this is largely reversible with medical help. Alopecia areata, where patches of hair may be lost, may cause hair to grow back gray but the color can return eventually. Vitiligo is a condition, famously suffered by Michael Jackson, where melanocytes in the skin and hair start to die or cease to function,and it can also make hair go gray.