Who determines production and distribution under socialism?

What and how much will be produced?How will it be produced?For whom will it be produced?A socialist system is a form of command economy in which prices and production are set by the state.