Before the Russian Revolution of 1917, "socialism" and "communism" were synonyms. Both referred to economic systems in which the government owns the means of production. The two terms diverged in meaning largely as a result of the political theory and practice of Vladimir Lenin (1870-1924).
Like most contemporary socialists, Lenin believed that socialism could not be attained without violent revolution. But no one pursued the logic of revolution as rigorously as he. After deciding that violent revolution would not happen spontaneously, Lenin concluded that it must be engineered by a quasi-military party of professional revolutionaries, which he began and led. After realizing that the revolution would have many opponents, Lenin determined that the best way to quell resistance was with what he frankly called "terror"--mass executions, slave labor, and starvation. After seeing that the majority of his countrymen opposed communism even after his military triumph, Lenin concluded that one-party dictatorship must continue until it enjoyed unshakeable popular support. In the chaos of the last years of World War I, Lenin's tactics proved an effective way to seize and hold power in the former Russian Empire. Socialists who embraced Lenin's methods became known as "communists" and eventually came to power in China, Eastern Europe, North Korea, Indo-China, and elsewhere.
These are the opening two paragraphs of Bryan Caplan, "Communism," in David R. Henderson, ed., The Concise Encyclopedia of Economics.
With the 100th anniversary this month of the Communist takeover in Russia, it's worth reviewing Communism's record. Caplan does that very well. I recommend the whole piece. Notice also Bryan's insightful use of production possibility curves to make his point.
Another excerpt explaining how the Communists achieved their grip on power:
The most important fact to understand about the economics of communism is that communist revolutions triumphed only in heavily agricultural societies. Government ownership of the means of production could not, therefore, be achieved by expropriating a few industrialists. Lenin recognized that the government would have to seize the land of tens of millions of peasants, who surely would resist. He tried during the Russian Civil War (1918-1920), but retreated in the face of chaos and five million famine deaths. Lenin's successor, Joseph Stalin, finished the job a decade later, sending millions of the more affluent peasants ("kulaks") to Siberian slave labor camps to forestall organized resistance and starving the rest into submission.
The photo above is from "Mass killings under Soviet regimes," Wikipedia. It shows bodies being uncovered in 1943; the people were killed in Ukraine under Stalin in 1937-38.