Ok, first point: Socialism is a term that predates Marx. Socialism began early in the industrial revolution, as a moral reaction against the abuses inherent to of privately-owned industry of the time. The basic idea was that that we should find some social and economic system that focused on the welfare of the community as a whole: in Aristotle's sense that a community was like a ship, and that everyone aboard had to work toward a common goal and a common welfare, or the whole thing would founder and sink. The term 'Socialism' was coined as an opposition to the Liberal 'individualism' that produced destructive competition and the horrific conditions of 19th century industrial life.
Marx picked up the term in the context of his critique of class-based capitalism, and changed the meaning. For Mark, socialism was a system that occurred after working classes overthrew individual-ownership capitalism. In essence, the working classes would remove productive property from the hands of individual owners and entrust it to a state apparatus which would fulfill the managerial role in the working classes' name. The ideal was that the working classes would then be in control of their own productive capacity, because the state itself would be responsive to the needs and interests of the working classes. But in practice (as Marx noted) the state would tend to become a new ruling class that supplanted the class of individual capitalists, and so the system would tend to collapse into dictatorship of one sort or another. Later theorists came up with many different forms of socialism in an effort to offset this tendency — e.g. syndicalism, in which governmental functions were handed off to the leaders of labor unions — but the core problem remained, that socialist systems retained the class structure of manager and worker classes, and thus could not escape the problems of class tyranny.
Communism was Marx's underspecified end-goal: a system in which the concept of 'class' is abolished entirely, so that exploitation and oppression become impossible. One might think of Marx's conception of communism as a form of Liberal democracy stripped of any free market competitive influences, though that's difficult for people in the Western world to visualize.
There have never been any communist nations of any scale. Nations that have called themselves 'communist' have generally been one form or another of socialist dictatorship, in much the same way that many nations which have styled themselves as 'democratic' are in fact autocratic dictatorships. At best we can think of the term 'communist' as aspirational; at worst as mere gas-lighting.