Although both socialism and communism are based on the belief that the goods and services that are produced in an economy should be in possession of government, and also controlled and planned by the government, and also they both are way different from capitalism which is an economic system under which the factors of production are owned privately and it is the market forces which determines the price of goods and services and not government, but there are some differences between the two.
Socialism can be defined as an economics system under which government owns basic factors of production while rest is in private hands while communism is more extreme than socialism in the sense that there is no private ownership of property and all resources are owned by government. Hence socialism is a mix of both public or government enterprise and private enterprise while in communism economic system all resources are under the control of government and there is no private participation. Also in communism all decisions whether it is political or economical are made by government and all have to strictly adhere it.
Although in present world there are only few economies which have communism, but rather they are mix of socialism and capitalism economic system.