The eight pillars of a caste system as examined in countries such as India, United States, and Nazi Germany include; Divine will, heritability, endogamy, purity and pollution, occupational hierarchy, dehumanization and stigma, terror and cruelty, inherent superiority and inferiority.
A caste system operates when a paranoid upper-class population, usually made up of a single race or ethnicity, decide it's in their best interest to protect their social and economic standing in the event of an uprising or economic downturn. The system is further enforced by tightening the rules of engagement, which limit individuals of the lower-class from escaping the trappings of poverty.
Lower-caste individuals are incorporated into the oppression of their own kind through civil duty, which further divides the lower-class and pits them against each other. The upper-caste are idolized by the overall society, which serves as a psychological warfare against the lower-caste. The constant beat down kills their morale to make it out, which greatly reduces their numbers and further root them in inescapable poverty.
In the event of social unrest, the system puts in place a puppet leader from the lower-caste to sway the public from rebelling against the system. Down the line, however, they reinstate a leader who reinforces the caste system in a more brutal and unforgiving way. This cycle of oppression is endless, as the only purpose it serves is to maintain the caste system.
The long-term effects of such a diabolical system is the development of systemic flaws that doom the entire society, which eventually implodes on itself. A society free of the caste system is achievable only by the sheer will of all people from both sides of the spectrum coming together to uproot the rot.