Karl Marx's ideas about the state can be divided into three subject areas: pre-capitalist states, states in the capitalist (i.e. present) era, and the state (or absence of one) in post-capitalist society. Overlaying this is the fact that his own ideas about the state changed as he grew older, differing in his early pre-communist phase, the "young Marx" phase which predates the unsuccessful 1848 uprisings in Europe, and in his mature, more nuanced work.
In Marx's 1843 Critique of Hegel's Philosophy of Right, his basic conception is that the state and civil society are separate; however, he already saw some limitations to that model:
By the time he wrote The German Ideology (1846), Marx viewed the state as a creature of the bourgeois economic interest. Two years later that idea was expounded in The Communist Manifesto
The executive of the modern state is nothing but a committee for managing the common affairs of the whole bourgeoisie.
This represents the high point of conformance of the state theory to an economic interpretation of history: The forces of production determine peoples' production relations; their production relations determine all other relations, including the political. ("Determines" is the strong form of the claim, Marx also uses "conditions". Also, even "determination" is not causality, and some reciprocity of action is admitted.) The bourgeoisie control the economy, therefore they control the state. The state, in this theory, is an instrument of class rule.
The Communist Manifesto was a short polemical work; more detail on the theories concerned can be obtained by going back to The German Ideology:
The Relation of State and Law to Property
. . . In the case of the nations which grew out of the Middle Ages, tribal property evolved through various stages - feudal landed property, corporative moveable property, capital invested in manufacture - to modern capital, determined by big industry and universal competition, i.e. pure private property, which has cast off all semblance of a communal institution and has shut out the State from any influence on the development of property. To this modern private property corresponds the modern State, which, purchased gradually by the owners of property by means of taxation, has fallen entirely into their hands through the national debt, and its existence has become wholly dependent on the commercial credit which the owners of property, the bourgeois, extend to it, as reflected in the rise and fall of State funds on the . By the mere fact that it is a class and no longer an estate, the bourgeoisie is forced to organise itself no longer locally, but nationally, and to give a general form to its mean average interest. Through the emancipation of private property from the community, the State has become a separate entity, beside and outside civil society; but it is nothing more than the form of organisation which the bourgeois necessarily adopt both for internal and external purposes, for the mutual guarantee of their property and interests. The independence of the State is only found nowadays in those countries where the estates have not yet completely developed into classes, where the estates, done away with in more advanced countries, still have a part to play, and where there exists a mixture; countries, that is to say, in which no one section of the population can achieve dominance over the others. This is the case particularly in Germany. The most perfect example of the modern State is North America. The modern French, English and American writers all express the opinion that the State exists only for the sake of private property, so that this fact has penetrated into the consciousness of the normal man.