In theory, modern representative democracy — unlike ancient Greek direct democracy — means that people vote for so-called representatives to fill various executive and legislative government offices. Those officials then enact and enforce rules that people are expected to obey under threat of fine and/or imprisonment.
In theory, socialism has mostly been understood as direct government economic planning through public, that is, state, ownership of the means of production. In no real sense can a public own — meaning control — factories, farms, etc. In reality public ownership means control by the collection of politicians and bureaucrats called the state. Thus socialism until recently has been understood to entail abolition of private property, money, and markets. Competition, cooperation, and exchange give way to monopoly, command, and compliance.