From a legal perspective, the caste discrimination has been illegal in India since independence. The leaders of the Indian Congress Party were quite adamant that caste discrimination should not exist in independent India. After independence, several measures were put in place to achieve this goal, such as a quota system for traditionally discriminated castes, a ban on tenant farming and company-store type practices, etc. These remedies are supposed to be enforced down to even private clubs and businesses. Indian justice being slow, this doesn’t always work, and there has been a movement for proportional representation for traditionally discriminated castes. There are still outbreaks of caste violence, particularly in rural areas.
On a social level, I think many Hindus still tend to be caste conscious, although this has changed quite a bit since independence. Many people still marry within a caste (many people marry within subcastes or a particular community still as well). However, the idea that one cannot be a priest because of caste has largely disappeared (except for perhaps in the rural areas). Prior to independence, also, Dalits used to be called untouchables. Traditionally they held jobs such as funeral workers or cleaners. If their shadow fell on you you were polluted, and had to go take a bath and perform rituals. I have never seen anybody do this in my trips to India in the past 30 years, and I think most Hindus would find this notion laughable today. I don’t think many Hindus think it’s somehow evil for a person not to have an occupation that falls into traditional caste roles.
Now, more on the caste system:
Traditionally, there are 4 castes. The Brahmans (priests and teachers), the Kshatriyas (kings, warriors), the Vaisyas (merchants and tradesmen) and the Sudras (menial labor). Then there are the “untouchables” who are outside the caste system and did “dirty” work such as funeral work, etc.
The definition for the caste system can be found in the Rig Veda, specifically the following verse in which a “cosmic man” is sacrificed and from his parts come all of creation.
It’s not clear that this is meant to be strict definition or hereditary, but it is clear that by the time of the Mahabharta, the caste system has become entrenched in India as well as heriditary. However, in the Mahabharta, there are several stories and verses which denounce the caste system. Therfore, it cannot be said that the caste system is an integral part of Hindu doctrine in theory, although in practice it certainly was until independence.
Further, the advaitic branch, which I mentioned earlier, does not hold to a caste system, and there are several other branches of Hinduism which do not have a caste system as well.
The caste system in its traditional form appears to have been codified by priest named Manu in his book Dharma Shastra, during the first millenium BC. Personally, I think this is a vile book, and it seems inordinately preoccupied with economics, dictating who can have what job, which castes can own property, etc.
Curiously, I’ve noticed some Indian Christians to think of themselves in caste terms.