Government strongly encouraged the production of industry through factories in World War II. President Roosevelt understood quite clearly that increase war production, the employment that results, and the profit generated would be the best way to defeat the economic depression that gripped the nation at the outset of the conflict. In committing all of its forces to the war effort, the government ended up giving a large amount of continued and protracted business to industry. The New Deal initiatives that seemed to strike at much of business interests were put aside as the United States committed all of its economic and industrial efforts to the war and the production of war materials which ensured. For this and other reasons, it is argued that World War II did much to kill the New Deal for big business once again ended up being critical to American legislation and policy interests.
Another thing that was done is women were recruited to go to work. Many men were being sent away to war and this left many jobs unfilled in the United States. One way that this was remedied was by women joining the work force. This did change the family dynamic.
Rationing was a term that was used to describe the goods that had to be saved for military use. These items were available in a very limited supply to the public. Some of these items were gas, clothing, and food. The government made sure that this applied to everyone no matter how wealthy you were. They did it this way to prevent the lower and middle class citizens from getting angry. Having these extra supplies helped to ensure that more materials were readily available to the government.
The industries still produced all of these items, they were mostly just made for the war and used in the war.
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.
Fighting in World War II required wide variety of war materials including huge numbers of ships, tanks, aircraft, and weapons, in addition to ordinary things like food, clothing, and medicines. To meet this requirements many countries built many plants to manufacture war goods and turned old factories into war plants. For example, the Rolls Royce car factory was used to produce aircraft engines.
United States hugely increased its output multifold. It produced 60,000 aircraft during 1942 and 86,000 in 1943, which was earlier believed to be impossible to achieve. Major improvements were made in operations and management of factories. This not increased production and reduced the production lead-time. For example, time needed to build an aircraft was reduced from 36 months in 1941 to 15 months in 1945. In spite of frequent damage to its factories Britain also maintained and even increased its output during World War II.
Sourcing of material from nations such as Canada and Australia increased substantially. Similarly Great Britain started sourcing industrial material from its colonies like India, reversing their policy of discouraging industrial development of these countries.
Because of the shortage of manpower created by men fighting in the war, women joined the labour force and occupied many positions previously held only by men. They worked in farming and many different industries including shipyards and aircraft factories and filled many jobs previously held only by men. Employment of women was particularly common as drivers, nurses, firewatchers, and air raid wardens.
Also government in all countries increased their control over Government controls over civilian life including factory production, ensuring that maximum productive capacity was directed towards war efforts. The shortages created for supplied of food and other item because of reduced non military production was managed using different schemes of rationing.