In the Rig Vedic Period, caste system did not exist in its rigid form. Society was divided into various classes on the basis of their profession. These professions later became hereditary.
In the Later Vedic Period, the caste system became rigid and the society came to be divided into four main castes. The Brahmans occupied the top position and performed all the rituals. The Kshatriyas were a warring class who occupied the second class and protected their kingdom from any external attacks. The Vaishays were farmers, traders and businessmen. The shudras occupied the lowest strata of the society and were supposed to do all the menial work.