In May, 1940
Germany invaded Western Europe, taking on the British and French militaries. Six weeks later,
France surrendered to Germany. Three months after that, Germany,
Italy, and
Japan signed a mutual defense agreement, the Tripartite Pact, and were known as the Axis Powers.
Then, nine months later, in June 1941, while still battling Britain, Germany betrayed and invaded its partner, the Soviet Union (see Russia), forcing the Soviets into the Allied camp (although they still abided by their non-aggression treaty with Japan).
In December 1941, Japan attacked the United States bringing it too into the war on the Allied side. China also joined the Allies, as eventually did most of the rest of the world.
By the beginning of 1942, the major combatants were aligned as follows: Britain, the British Commonwealth Nations, the United States and the Soviet Union were fighting Germany and Italy; and Britain, the British Commonwealth Nations, China, and the United States together with the Philippines were fighting Japan. From then through August 1945, battles raged across all of Europe, in the North Atlantic Ocean, across North Africa, throughout Southeast Asia, throughout China, across the Pacific Ocean and, by air, in Japan.
Italy surrendered in September 1943, Germany in May 1945. The surrender of Japan marked the end of the war, on September 2, 1945.