There are several things that could cause this. The most common cause is hereditary. If this is not the case for you, it could be that your body is lacking in nutrients, that you had a severe illness, or suffered from shock. While whitening is usually experienced with age, some people do whiten as early as their teens.
The age in which your hair starts to gray depends on genetics, but can also be caused from excess stress. Either way, there's not a whole lot you can apart from dying your hair. Reducing stress can help with future graying though, if it is the cause.
Thats quite natural nowadays to get hair white in age 30. This is mainly due to vitamin-A deficiency. This can be cured my taking vitamin rich foods and applying herbal oil on your hair.