The US government's reaction to its entry into WWII was to institute massive deficit spending, and the conscription of all able bodied young men for the war effort, thus creating a full-employment economy which was the immediate end to the Great Depression. A belief existed that another depression might occur upon the return of the young men to the labor force so a comprehensive veteran's benefit package was legislated. The logistics of the ensuing peace created a natural US trade advantage which allowed for the unfettered repayment of the war generated deficit. The liberal veteran's educational and housing benefit resulted in increased productivity and a construction boom. These forces combined to forestall any otherwise feared return to the depression.
Most historians and economists agree that the Depression did not end until the beginning of WWII.
It improved economics because the war created more jobs such as creating weaponry and manufacturing the raw materials to run a war. These new jobs were able to jump start the economy.
businesses had to make items for the war, so they made money and could employ people again. the butterfly effect, the people could pay their debts and afford food.
The war economy ended unemployment when everyone (including women) had to work in all the unfilled positions so the armament, ships and planes could be built. The wages went up and inflation did not skyrocket. So the economy stabilized.
In the US , WW2 put many back to work in factories .