In Marxism, the state apparatus, more commonly known as simply the state, is a system by which the ruling class maintains and perpetuates its dominance within the social formation. It functions by subjugating the other class(es) within class society, and reproducing ruling class ideology.
Bourgeois economists, fascists, and reformists falsely claim that the state is "above" class society and independent of class interests. For instance, liberal social democrats define capitalist state-owned enterprises as socialist because they view them as independent institutions that have their own class character separate from the class-neutral state, rather than mere arms of a state with inherent class character.
The existence of the state apparatus is a product of class struggle; the systems we now call "the state" (although for much of antiquity and medieval times, they were not called that), naturally emerged because the means of production became sufficiently advanced for classes to emerge. As a result, complex class society necessitated tools and methods by which the ruling classes could protect their interests (i.e. the perpetuation of the existing relations of production).
In other words, the state is an oppressive system arising as a consequence of the same material conditions that caused the beginning of class society. By asserting its dictatorship, the ruling class temporarily "reconciliates" the contradictions of class struggle by enforcing its interests and violently repressing the other classes. However, if material conditions and productive forces within a society develop sufficiently, this state of affairs will become untenable; resulting in revolution-- whereby a new class takes control of the state, and creates new apparatuses to serve its interests.
Repressive and ideological state apparatuses
The modern state apparatus is a complex system of interrelated forces that each serve the purpose of perpetuating the current class society. It can be roughly subdivided into the repressive state apparatuses-- direct apparatuses which carry a threat of explicit violence, such as police, military, the judicial and prison systems-- and the ideological state apparatuses, which are more subtle cultural and ideological forces that reproduce ruling class ideology, such as the education system, mass media, the arts, and so on. Taken together, all these systems are responsible for reproducing the relations of production.
Withering away of the state
The state apparatus can never truly "solve" class struggle, as the only solution to class struggle is the abolition of class society. However, individual contradictions can be resolved, if material conditions develop; specific repressive and ideological apparatuses can be dissolved when the material reality no longer necessitates their existence. However, the future state of affairs where class society has been completely "solved", and the state no longer has any material basis for its existence, is what Marxists call communism; a stateless society.
As such, in the process of building communism, as more and more fundamental contradictions are resolved, more and more aspects of the state apparatus will cease to have a material basis for their existence, until the state is no longer a state in any meaningful sense of the word. That process is what Marxists term "the withering away of the state".
Lenin, in making constant references to Engels in the State & Revolution made it succinct to make a distinction: What is "abolished" is the bourgeois state during the course of a proletariat revolution and what "withers away" is in fact the proletarian state.
There still exist stateless societies in the modern day, in the form of tribes in some parts of the world. In these societies, there is no concept of private property or personal property; the means of production are shared between all members, and the surplus value from the resulting production is mostly shared equally between all. This stateless, classless, and moneyless form of organization is known to Marxists as primitive communism.
The Namal people of Vanuatu, for example, craft their hunting weapons for the benefit of the collective, which the men and children will use as a group for their daily hunts in the surrounding forest. The resulting catch from the hunt is then cooked in the village and shared equally according to everyone's needs.
Dictatorship of the bourgeoisie
See main article: Dictatorship of the bourgeoisie
As capitalism develops from feudalism, a bourgeois revolution may bring the bourgeoisie to power. Through the militant replacement of the feudal nobility in favor of the capitalists as the ruling class of society, a dictatorship of the bourgeoisie will be constructed. Such a bourgeois dictatorship will often rest upon ideological concepts like "natural rights", "popular consent", and other idealistic notions in order to maintain their power, and make their plutocracy (the rule of the rich) look like a democracy (the rule of the majority). However, as capitalism begins to develop, it will, overtime, result in the economy being ruled by fewer-and-fewer hands, and subjecting the proletariat to increasingly exploitative conditions.
Commonly, when a bourgeois dictatorship is nearing its end due to the growing power of the worker movements, the ruling class will resort to extreme measures to maintain their wealth and power. One such expression of bourgeois extremism is fascism, which includes the total consolidation of capital into the hands of the few, and forceful obliteration of any resistance from the proletariat using the repressive state apparatuses.
Dictatorship of the proletariat
See main article: Dictatorship of the proletariat
When capitalism reaches its breaking point, a proletarian revolution will happen. This leads to the dictatorship of the proletariat, where the proletariat as a class (and not as individuals necessarily) control the state so as to oppress the bourgeoisie, much like the bourgeoisie has been oppressing the proletariat for centuries.
- “And people think they have taken quite an extraordinary bold step forward when they have rid themselves of belief in hereditary monarchy and swear by the democratic republic. In reality, however, the state is nothing but a machine for the oppression of one class by another, and indeed in the democratic republic no less than in the monarchy; and at best an evil inherited by the proletariat after its victorious struggle for class supremacy, whose worst sides the proletariat, just like the Commune, cannot avoid having to lop off at the earliest possible moment, until such time as a new generation, reared in new and free social conditions, will be able to throw the entire lumber of the state on the scrap-heap.”
Friedrich Engels (1891). Introduction to Karl Marx's "Civil war in France".
- “This expresses with perfect clarity the basic idea of Marxism with regard to the historical role and the meaning of the state. The state is a product and a manifestation of the irreconcilability of class antagonisms. The state arises where, when and insofar as class antagonism objectively cannot be reconciled. And, conversely, the existence of the state proves that the class antagonisms are irreconcilable.”
Vladimir Lenin (1918). The state and revolution: 'Class society and the state; The state: a product of the irreconcilability of class antagonisms'.
- The ideology of the ruling class does not become the ruling ideology by the grace of God, nor even by virtue of the seizure of State power alone. It is by the installation of the ISAs in which this ideology is realized and realizes itself that it becomes the ruling ideology. But this installation is not achieved all by itself; on the contrary, it is the stake in a very bitter and continuous class struggle: first against the former ruling classes and their positions in the old and new ISAs, then against the exploited class. Louis Althusser, Ideology and Ideological State Apparatuses, "Ideology has no History"
- Political Economy: 'Economic Doctrines of the Capitalist Epoch' (1954).