In the theories of German philosopher Karl Marx, a state in any society is an instrument of oppression by one social class over another, historically a minority exploiter class ruling over a majority exploited class. Marx saw that in his contemporary time the new nation states were characterized by increasingly intensified class contradiction between the capitalist class and the working class it ruled over. He predicted that if the class contradictions of the capitalist system continue to intensify, that the working class will ultimately become conscious of itself as an exploited collective and will overthrow the capitalists and establish collective ownership over the means of production, therein arriving at a new phase of development called socialism (in Marxist understanding). The state ruled by the working class during the transition into classless society is called the "dictatorship of the proletariat". Vladimir Lenin created revolutionary vanguard theory in an attempt to expand on the concept. Lenin saw that science is something that is initially practicable by only a minority of society who happen to be in a position free from distraction so that they may contemplate it and believed that scientific socialism was no exception. He therefore advocated that the Communist party should be structured as a vanguard of those who have achieved full class consciousness to be at the forefront of the class struggle and lead the workers to expand class consciousness and replace the capitalist class as the ruling class, therein establishing the proletarian state.
During the 20th century, the world's first constitutionally socialist state was in Russia in 1917. In 1922, it joined other former territories of the empire to become the Union of Soviet Socialist Republics (USSR). After World War II, the Soviet Army occupied much of Eastern Europe and thus helped establish Communist states in these countries. Most Communist states in Eastern Europe were allied with the Soviet Union, except for Yugoslavia which declared itself non-aligned. In 1949, after a war against Japanese occupation and a civil war resulting in a Communist victory, the People's Republic of China (PRC) was established. Communist states were also established in Cambodia, Cuba, Laos and Vietnam. A Communist state was established in North Korea, although it later withdrew from the Communist movement. In 1989, the Communist states in Eastern Europe collapsed under public pressure during a wave of non-violent movements which led to the dissolution of the Soviet Union in 1991. Today, the existing Communist states in the world are in China, Cuba, Laos and Vietnam.
These Communist states often do not claim to have achieved socialism or communism in their countries—rather, they claim to be building and working toward the establishment of socialism in their countries. For example, the preamble to the Socialist Republic of Vietnam's constitution states that Vietnam only entered a transition stage between capitalism and socialism after the country was re-unified under the Communist Party in 1976 and the 1992 constitution of the Republic of Cuba states that the role of the Communist Party is to "guide the common effort toward the goals and construction of socialism".
Communist states share similar institutions, which are organized on the premise that the communist party is a vanguard of the proletariat and represents the long-term interests of the people. The doctrine of democratic centralism, which was developed by Vladimir Lenin as a set of principles to be used in the internal affairs of the communist party, is extended to society at large.
According to democratic centralism, all leaders must be elected by the people and all proposals must be debated openly, but once a decision has been reached all people have a duty to obey that decision and all debate should end. When used within a political party, democratic centralism is meant to prevent factionalism and splits. When applied to an entire state, democratic centralism creates a one-party system.