Basically, Marx's solution to the situation of the proletariat was to (eventually) have socialism and communism. Once this was accomplished, workers would be in an ideal situation.
The problem, to Marx, was that workers were exploited by their bosses. The people who owned the "means of production" lived off the labor of the peopld who did not own the means of production. This, to Marx, was unfair.
Therefore, he argued, the workers had to come to control the means of production. Then the people who did the work would be the ones who got the benefit of that work. (Instead of having owners get most of the benefit of the workers' labors.)