First you understand Caste:
A caste is a combined social system of occupation, endogamy, culture, social class, and political power. Caste should not be confused with class, in that members of a caste are deemed to be alike in function or culture, whereas not all members of a defined class may be so alike.
The Caste System or varna-ashrama has been one of the most misrepresented, misinformed, misunderstood, misused and the most maligned aspects of Hinduism. If one wants to understand the truth, the original purpose behind the caste system, one must go to antiquity to study the evolution of the caste system. Caste System, which is said to be the mainstay of the Hindu social order, has no sanction in the Vedas. The ancient culture of India was based upon a system of social diversification according to SPIRITUAL development, not by birth, but by his karma. This system became hereditary and over the course of many centuries degenerated as a result of exploitation by some priests, and other socio-economic elements of society.
Socio Economic Structure:
This division of society into four types, the teacher, the warrior, the merchant and the laborer, is based on sound psychology, ethics, biology and economics. Some men are intellectually by temperament, some are active, some acquisitive and others undefined, none of these. To each are assigned the task true to its type, in conformity with its inherent temperament, svadharma.All together formed an organic whole. Under an arrangement such as this, there is conservation of social energies; there is no necessity of trial and error method. All are not equally endowed with equal physical and mental capacities, but every one should be given an opportunity for putting to use the faculties with which he has been endowed. Man should be treated as man, and not as an economic hand. Danger of exploitation of one group by another can be eliminated. Social harmony and conscious co-operation were made the chief characteristics of human association. The ideal was to evolve a functional and not an acquisitive society. It is this varna dharma that has been the bulwark of Indian civilization and saved it from wreckage of time. Each group had its duties and its own rewards or compensation. The laborer had to work, but he was to be looked after as a younger member of a family. The man of desire, the vaishya, was to acquire wealth; power and authority was vested in the kshatriya, while all these were to honor the teacher, to obey his religious and spiritual injunctions and accept his guidance. The teacher was to be supported by the gifts of the other three groups.
In an inter-faith debate, most Hindus can easily be put on the defensive with a single word-caste. Any anti-Hindu polemist can be counted on to allege that "the typically Hindu caste system is the most cruel apartheid, imposed by the barbaric white Aryan invaders on the gentle dark-skinned natives." Here's a more balanced and historical account of this controversial institution. Merits of the Caste System
The caste system is often portrayed as the ultimate horror. Inborn inequality is indeed unacceptable to us moderns, but this does not preclude that the system has also had its merits. Caste is perceived as an "exclusion-from," but first of all it is a form of "belonging-to," a natural structure of solidarity. For this reason, Christian and Muslim missionaries found it very difficult to lure Hindus away from their communities. Sometimes castes were collectively converted to Islam, and Pope Gregory XV (1621-23) decreed that the missionaries could tolerate caste distinction among Christian converts; but by and large, caste remained an effective hurdle to the destruction of Hinduism through conversion. That is why the missionaries started attacking the institution of caste and in particular the Brahmin caste. This propaganda has bloomed into a full-fledged anti-Brahminism, the Indian equivalent of anti-Semitism. Every caste had a large measure of autonomy, with its own judiciary, duties and privileges, and often its own temples. Inter-caste affairs were settled at the village council by consensus; even the lowest caste had veto power. This autonomy of intermediate levels of society is the antithesis of the totalitarian society in which the individual stands helpless before the all-powerful state. This decentralized structure of civil society and of the Hindu religious commonwealth has been crucial to the survival of Hinduism under Muslim rule. Whereas Buddhism was swept away as soon as its monasteries were destroyed, Hinduism retreated into its caste structure and weathered the storm. Caste also provided a framework for integrating immigrant communities: Jews, Zoroastrians and Syrian Christians. They were not only tolerated, but assisted in efforts to preserve their distinctive traditions.