I assume you mean in the United States, where most of the war material for the Allies was produced. The government simply took over many factories and industries, or required them to produce war goods instead of what they had been making for civilian consumption. There were also War Production Boards that coordinated the requirements of government and the military with the needs and capabilities of civilian businesses that contracted with them.
The National War Labor Board tried to maintain peace and stability in the workforce and tried to prevent strikes and disputes so nothing interrupted production.
They also rationed resources such as gasoline, aluminum and steel so that they were concentrated and directed towards war industries. This created shortages for civilians, but kept the factories well supplied.