Japan's involvement in World War 2 was largely a matter of their alliance with Germany, and America's Japanese trade embargo that had been in place pre 1941. In Asia, Japan had began to pursue an empire that would bring a variety of raw materials. To continue with this would inevitably lead to war with the US.
As such, Japan aimed to knock-out the American Pacific fleet stationed at Pearl Harbor. By doing so, they could then begin to occupy a number of territories in the region. Therefore, in late 1941 Japanese aircraft carriers headed towards the American naval base of Pearl Harbor. Here, they remained undetected by the US, and Japanese planes flew towards and bombed the Pacific fleet. 5 battleships were sunk during the bombing, and hundreds of US aircraft were also lost. However, fuel depots and carriers went un-hit by the bombers.
With this, Japan were now at war with the US. In addition to this, they were also at war with US allies such as Great Britain and other Commonwealth countries, along with China. However, Germany also declared war on the US following the Pearl Harbor strike. Therefore, Pearl Harbor had an impact for both Europe and Asia.
Despite the success of Pearl Harbor, it far from guaranteed a Japanese victory in the Pacific War. Japan's military were up against larger armies in the Pacific, not just Americas but also China and then later the USSR would join the Pacific War in 1945. At Pearl Harbor, as mentioned they had not hit any of the American carriers of the Pacific fleet, nor the fuel depots which were certainly there to hit during the raid.
However, Japan gained many victories in 1942. They defeated and occupied many of the European colonies and territories in the region, and advanced southwards towards the Australian mainland. Their victories may have made a Japanese victory possible, but then the US navy remained wholly undefeated.
At sea, it began to become apparent what Japan were really up against. The Battles of Coral Sea, and the Battle of Midway, saw Japan lose many aircraft carriers and hundreds of supported aircraft. The defeats were a crushing blow to the once invincible IJN and indeed to Japan's overall war effort.
From here, Japan were primarily concerned with holding their positions and territory in the Pacific in the face of increasing Allied military superiority. Such positions were not always easy for the Allies to take, but the American island hopping strategy gradually advanced towards Japan as Japan's territory fell. Tarawa, the Marianas, and the Philippines were all occupied by the American army.
By 1945, all seemed lost with the war in Europe over. The IJN had only a few ships left and could not defend Japanese territory. Allied landings on Iwo Jima and Okinawa left them to land on Japan. Despite this Japan had still not given any unconditional surrender as called for by the Allies. The first a-bomb had been tested in New Mexico, and to end the war quickly was used against Japan. As the USSR overwhelmed Japanese armies in Manchuria, the Emperor gave unconditional Japanese surrender.
So, overall Japanese involvement in World War Two was entirely in the Pacific. Despite their alliance with Germany, the Pacific was largely Japan's front, and also the US who were largely preoccupied with their war against Japan in 1942 and 1943. For all the success Japan had in 1942, the Allies' alliance bloc in the Pacific had the resolve to continue a war that Japan were destined to lose in the long run.