The short answer:
They prepared in secret for years, the allies had to prepare and fight at the same time, it took time to get to a level of strength to defeat the Axis powers.
where japan have victories and loses
Japan's expansion westward onto China, southward towards Australia, and in the western pacific ocean, were all victories until the end of 1942. Both her ally Germany, and Japan itself, began total reverses in 1943.
japan
It started out being Italy, Japan, and Russia (USSR). However, Russia (USSR) switched sides after Hitler screwed him over. Thus, leaving Germany's Allies being Italy and Japan.
The United States started fighting Japan in 1941, since Germany & Italy were allies of Japan, they declared war on The U.S.
WWII was a global war. There were two main agressors, Germany and Japan. Japan invaded China in 1937, so you could say it started in Asia. Germany invaded Poland in 1939, so it started in Europe at that time.
America declared war on Germany one day after the Pearl Harbor attack. Japan and Germany formed an alliance, so with the US now being at war with Japan, as such they were also at war with Germany.
Japan sided with Germany and Italy. These three joined forces to make up what was called the Axis.
Germany, Italy, and Japan
The war started at different times in different areas. Eroupe: Germany attacks Poland Pacific: Japan attacks USA Africa: Germany attacks Africa
Germany invaded poland on september 1st 1939, and started WORLD WAR II. World War I started when Serbia denied to allow Austrian police to enter their country and "conduct an investigation to find out who killed their prince".
For the USA vs. Japan portion of WWII, the Coral Sea battle started the USA's victories against Japan. The atomic bombings of Hiroshima and Nagasaki ended WWII though.