According to Karl Marx, class consciousness is developed through the struggle of the proletariat against the bourgeoisie. This struggle leads to the development of a revolutionary consciousness among the proletariat, which eventually leads to the overthrow of the bourgeoisie.
Marx thought that there are two classes in society: the bourgeoisie and the proletariat. The bourgeoisie owns the means of production while the proletariat sells its labor power for wages. Marx believed that this inequality would lead to conflict between these two classes because he believed that it was impossible for workers to achieve equality with capitalists without overthrowing them first.
The working class will become conscious only through its own efforts, through its own experiences. The working class has no other choice but to fight for its rights and interests by organising itself into political parties based on a clear socialist programme. This is what Marx called developing revolutionary consciousness.
In his book The Communist Manifesto (1848), Marx wrote that class consciousness would develop as workers realized they were being exploited by capitalists. As they became more aware of their situation, they would fight back against their exploiters and demand better working conditions and higher wages.
Philosopher believed that this process would happen naturally as workers came together in groups and united against their oppressors.
As a result of these struggles, Marx predicted that class consciousness would lead to revolution — a violent uprising against those who oppressed workers — followed by an eventual transition into socialism and then communism (a stateless society in which everyone has equal access to resources).