The Indian caste system is a method for organizing the social and economic groupings within India. It is a system that the Aryans established between three and four thousand years ago. The Aryans migrated from south-central Asia and settled along the Indus River Valley in present-day Pakistan. They were greatly outnumbered by the local Dravidian population. The Aryans were more advanced than the Dravidians at this time and had lighter skin. The function of the caste system was so the lighter-skinned Aryans could maintain social dominance over the natives by classifying people into different castes. The system in the early years was closely connected to skin tone and race.
A caste is a social group that somebody is born into. It is derived from the Portuguese word casta, which means race. Indians called the different castes the jati. The caste system dictated what jobs you could have based on your caste. It also established dietary and marriage restrictions. Different laws applied to different castes.
There were thousands of castes within the system, but they were eventually categorized into four main groupings: Brahmins, Kshatriyas, Vaisyas, and Sudras. The concept of jati and the duty of each group became closely associated with Hinduism and the belief in reincarnation. While you were born into a certain jati, you could not improve your status in this lifetime. However, if you followed the duties of your caste you could ascend to the higher caste in your next life.