The YouTube video below shows a news reel as Japan surrenders, in the ceremony that took place on board the USS Missouri in Tokyo Bay. This formal ceremony officially ended WWII.
Following the bombing of Nagasaki on August 9th, 1945, an Imperial Council was held and a vote was taken to determine if they should surrender. The vote was a tie - 3 to 3 - and the Emperor of Japan was called to break the tie. The emperor voted to surrender.
On August 10, 1945, Japan officially offered to surrender to the Allies, with the only condition being that the emperor be allowed to remain the nominal head of state. On August 12th, the United States indicated that they would accept the terms, but the emperor would only be allowed to stay in a purely ceremonial capacity - not as the head of state.
While the Japanese leaders were debating the issue, air raids continued on Japan. Finally, on August 14th, thousands of leaflets containing the American's reply of August 12th (translated into Japanese, of course!) were dropped over Tokyo. Later that day, the emperor instructed his cabinet to accept the terms of the Allied Forces.
He is quoted as saying "I cannot endure the thought of letting my people suffer any longer"; if the war did not end "the whole nation would be reduced to ashes."
To read some facts about the attack on Pearl Harbor, the event that culminated with America joining in World War II, visit our Pearl Harbor Day page.