A class system and a caste system are both hierarchical, meaning they are organized like a ladder, with a few people on the top rungs, more people on the various middle rungs, and many crowded on the bottom rungs. The main difference between a class and caste system is that a class system has more fluidity: it is possible to move and up and down the ladder. In the caste system, people are cemented to their rung of the ladder.
Both are ideological or constructed systems that are strongly buffered with a narrative that states the system in question reflects a divine plan or order. In the West, the idea of a "great chain of being" envisioned the entire universe organized hierarchically, with God on top and then a descending order ending somewhere with insects or very simple life forms. It was often depicted as ridiculous for women to assert equality with men or lower classes people to want equality with their "betters," argued through drawings that showed a cat or dog ruling humans in a household or children beating their parents; such ideas were framed as inherently ridiculous and unnatural.
In India, the idea of reincarnation buttressed the caste system: it was taught that your place in the current system reflected how you lived in a former life. It would be wrong to interfere as the system worked out the natural justice and karma of the universe. Some argue that the British rule increased caste inequality because the British would only deal with the highest caste.
Class and caste systems benefit those at top at the expense of those at the bottom. Rigid class systems are detrimental to society as a whole, as they prevent talent from rising.