World War I was immediately precipitated by the assassination of Archduke Francis Ferdinand by a Serbian nationalist in June 28, 1914. This war happened in Europe against the world's great power. On one side were the Allies (France, Russia, Britain and United States). On the other side were the Central Pawers (Germany, Austria-Hungary, and Turkey). At he beginning of the war, U.S. President Woodrow Wilson declared neutrality (August 04, 1914) claiming that we were not military prepared to enter a war. However, this neutrality position was challenge by a series of events that made the United States enter the war in April 06, 1917.
In May 7, 1915 a British passenger ship, a German submarine sank "Lusitania". 128 Americans died in the incident. Wilson's administration strongly protested but Germany argued that Lusitania was a warship carrying munitions in its cargo. Despite the sinking of the Lusitania President Wilson declined to ask Congress for a declaration of war.
In 1917 British intelligence cracked a German secret code and intercepted a telegram. Two months later England forwards the telegram to United States. They didn't send it to United States sooner because they thought that U.S. would not believe them because they had lied to them in the past. The confidential telegram was from German foreign minister Arthur Zimmermann to German embosser Bernstorff proposing a German-Mexican alliance against the United States. Mexico's reward would be the recover of territory it had lost in Texas, California, New Mexico and Arizona (provided that German wins). Based on this on also on the fact that German high command ordered an unrestricted German submarine warfare against all shipping, Wilson asked Congress for declaration of war against Germany on April 02, 1917. Four days later, U. S. entered World War I on the Allies side. We were in war for late summer 1918 to November of the same year and won the war.