Socialism is the stage previous to communism when there’s a State in which the proletariat is in power, the purpose of the State is to use its repressive forces by one class over the other to oppress them and keep them in place, capitalism (also called the dictatorship of the bourgeoisie) has the bourgeois as its ruling class and oppresses the proletariat, socialism (also called the dictatorship of the proletariat) utilizes the State to oppress the bourgeoisie until global socialism is achieved, on that point on class society is abolished and the State is dissolved. This late stage is what we call communism.
How is this different from socialism?
Socialism is the stage previous to communism when there’s a State in which the proletariat is in power, the purpose of the State is to use its repressive forces by one class over the other to oppress them and keep them in place, capitalism (also called the dictatorship of the bourgeoisie) has the bourgeois as its ruling class and oppresses the proletariat, socialism (also called the dictatorship of the proletariat) utilizes the State to oppress the bourgeoisie until global socialism is achieved, on that point on class society is abolished and the State is dissolved. This late stage is what we call communism.