Roots generally perform the primary function of absorption and conduction of water and minerals from the soil to the plant body apart from providing anchorage and support. But under certain conditions, roots undergo modification to perform functions other than the primary functions of absorption, anchorage.

Root vegetables are generally modified roots acting as storage organs enlarged to store energy in the form of carbohydrates. Pure root vegetables are yams, beets or beetroot, parsnips, rutabagas or turnips, carrot, radish, and sweet potato are widely used as vegetables due to their nutritional value.

There are also many underground plant parts used as vegetables which are not roots but are modified stems. Potato is an edible underground stem that becomes fleshy and tuberous as a result of food storage. The stem of plants like ginger, turmeric are modified into rhizome while the stem of colocasia is modified into corm. All these stem modifications perform the function of storing food and are used for culinary purposes due to their nutritional value. Onions and garlic are also modified stems and are classified as bulbs.

More Info: en.wikipedia.org