Socialism is the social formation in which the means of production are made into public property and production is organized and rationally planned according to social needs. It comes into being when the working class constructs its own state, a class dictatorship in the form of the Dictatorship of the Proletariat, and oversees the conversion in social relations from capitalist (and sometimes feudal-tributary or slave relations, if such things existed in the old social formation) to socialist relations of production. It also constructs the new Ideological State Apparatuses that facilitate and support socialist relations of production.
Socialism is often spoken of as being "the conversion from capitalism to communism;" this is true but that sort of phrasing is a misnomer because communism is not a separate mode of production, per se. Communism, the total abolition of classes, oppressions, exploitations, disparities of wealth, and the state, is the highest developed form of the socialist social formation. The material relations between people that occur under socialism naturally and eventually lead to communism, and the aforementioned effects.