Communism refers to the way in which a government directs its economy. In a purely communist system, the means of production, which are land, labor, and capital, are owned in common by the working class. In the Soviet Union, the government owned the means of production.
Colonialism, unlike communism, refers to the way in which one country governs another country. The colonial power exploits the other country to extract raw materials and to find a market for its finished goods. For example, in the 1800s, Belgium controlled the Congo Free State as a colony (though it was officially owned personally by the Belgian king, Leopold). Belgium extracted ivory and rubber from the Congo by relying on slave labor and mass executions. This system is very different than the purest forms of communism, in which workers are supposed to control the means of production and the class system is supposed to collapse. In practice, however, communist countries such as the Soviet Union were colonial powers in countries such as Poland and Hungary before the collapse of the Soviet system.