If you want to know what Marx was on about, a good place to start is the following often cited sentence from a letter he sent to Joseph Weydemeyer on March 5, 1852. Let's have a look, and discuss it.
What I did that was new was to prove: (1) that the existence of classes is only bound up with particular historical phases in the development of production, (2) that the class struggle necessarily leads to the dictatorship of the proletariat, (3) that this dictatorship itself only constitutes the transition to the abolition of all classes and to a classless society .
When we talk of classes we are thinking of societies where one group of people subjugates another group for the purpose of exploiting their ability to labor. There were no classes in hunter-gathering society because there was little or no way of extracting a production surplus from a subjected group. In the case of inter-group conflicts enemies were killed rather than enslaved. It was only with grain cultivation that we get serious about one class exploiting another.
In agrarian societies the lower class could either be slaves or a serfs. While slaves were OK for some things such as domestic service, serfs were certainly better for grain production. It is hard to supervise farm work so it is better to force them to live off whatever is left over after meeting some "customary" impost from the lord.
While slaves and serfs are owned or otherwise tied to individual masters, workers under capitalism are "free". There is also greater mobility between classes. Also while you endure subjection and exploitation in production, you may find things are more free and easy in society at large. When you encounter a member of the bourgeoise in the street you are not required to bow, remove you hat or tug you forelock. You can sit anywhere you like in church and everyone is equal before the law.
This leads people to believe that we no longer have a class society. But as we have already said, class is about the control of the labor power of others. And that is still the case. The capitalists may not own you but they definitely still own your labor power. Or if they don't, you are stuck on welfare or marginal self-employment. (As the saying goes, the only thing worse than being exploited by capitalism is not being exploited by it.) And wealth - mansions and means of production - is simply congealed labor power.
It is worth keeping in mind here that the proletariat or working class is the vast majority of people in developed capitalist societies. We are not just talking about factory workers or miners. It is pretty well everyone on a wage or salary.
Of course, struggling against exploitation and subjugation would all be rather futile if nothing better could be achieved. This was certainly the case with peasant rebellions in pre-industrial societies. However, in the case of capitalism, it is a different story. The level of development created by the present system makes a better classless society plausible. Equality would mean sharing ever greater prosperity, leisure, and work that is free of hard grind and the old oppressive division of labor. History shows that there is little interest in sharing poverty and endless toil. So we now have the makings of a better society and economy, based on cooperation rather than the law of the jungle.
We have no way of knowing how long it will take for a growing number of toilers to see the road ahead and then overcome a cornered bourgeoisie that will viciously bite back with the help of anyone they can rally around words like property, family, country, individual, order and god.
Once you have seized power from the capitalists, your job has only just begun. The dictatorship of the proletariat involves a lot more than unseating the capitalists and keeping an eye on a small hostile minority. We won't have the peasant problem in the future but there will still be a petty bourgeoisie who generally have their mind set on becoming capitalists rather than joining the ranks of the proletariat.
But it is more than that. You have to put in place the foundations and fabric of a new society, and get rid of a lot of old stuff. We will have the social ownership which is a good start. We will have the material basis in the form of high per capita output and automation, although this may require a bit of post-war reconstruction if things get messy. Plus we will have general levels of education that are good enough to start seriously eating away at the old division of labor.
So we will have a lot of the hardware and firmware in place. The main remaining problem is the software - our thinking and behavior. Some of that will have changed during the process of successfully seizing power. In particular, the fact that this has occurred necessarily means that there has been a significant minority of people (the vanguard) committed to seeing the revolution through to the end.
But problems abound. People generally have limited experience running things. There will be a temptation to rely too much on people with expertise from the old society. The vanguard will have to be very adept at dealing with all sorts of perverse behavior that will disrupt the workplace and make life miserable. There will be sociopaths, concealed opponents, seriously disturbed people, people with low social skills that limit their ability to deal constructively tensions arise. The worst will be those who try to make out that you are the problem rather than them. The vanguard will have to learn very quickly, and be determined and courageous.
A special problem will be people who benefit from the old division labor and don't want things to change. Indeed members of the vanguard could fall into this category if they get too comfortable making all the decisions. Indeed they could become a new bourgeoisie as we saw in the Soviet Union and regimes derived from it. The dictatorship of the proletariat will not only have to get rid of the old bourgeoisie, it will also have to stomp on this new bourgeoise and double their effort to eliminate the conditions left over from capitalism that spawn it. This will require a firm revolutionary hand on the tiller of state backed up by a very active revolutionary "civil society" (a.k.a. mass movement).