In "The Communist Manifesto," Marx and Engels state that political power is merely the organized power of one class for oppressing another. Under the capitalist system, such political power is in the hands of the bourgeoisie, the owners of the means of production, who use their power to oppress the working classes, or proletariat.
If the proletariat is to change this system and break free from the shackles of bourgeois oppression, they need to get organized. This is a recurring motif running right throughout the manifesto. If a socialist revolution is to occur, then the proletariat must organize itself into a class through labor unions and political parties.
Before it can do this, however, it needs to develop a distinct class consciousness that makes it aware of the true nature of its oppression at the hands of the bourgeoisie. Socialist thinkers such as Marx and Engels regard themselves as having a key role to play in this regard.
Once the proletariat has become properly organized, it is in a position to confront the bourgeoisie in a revolution. If such a revolution is successful and the proletariat takes power, it will make itself the new ruling class.
But this will only be a temporary stage on the road to communism. For once the proletariat has taken power, it will set about abolishing the old conditions of economic production that gave rise to the formation of classes in the first place.
Once this is done, there will be no classes of any kind, bourgeoisie, proletariat, or otherwise. Instead of class-based political power, there will be an association "in which the free development of each is the condition for the free development of all."