The U.S. was committed to a policy of non-interventionism at the outbreak of World War I in 1914. President Wilson was more interested in avoiding conflict while trying to find some way to stop the fighting and make a peace settlement.
In 1915 a German U-boat sank the British ocean liner Lusitania. Normally this wouldn’t elicit a huge response from the U.S., but there happened to be over 100 Americans traveling on it when it went down, and this forced Wilson to speak out more strongly. He warned Germany that if the attacks continued the U.S. would be forced to act, and for a time, Germany backed down.
In 1916, a series of German sabotage missions, most notably the Black Tom explosions in Jersey City, New Jersey further increased anti-German sentiment in the U.S.
In 1917 German did two things that finally forced American into the war. One was a resumption of unrestricted submarine warfare, which sent seven more U.S. ships to the bottom. The other was the Zimmerman Telegram, in which the German foreign minister invited the country of Mexico to join Germany in war against the U.S. They would not only support Mexican attacks with supplies, but also help them regain the territory lost in the Mexican-American War. Both of these events led to an eventual declaration of war by Congress in April of 1917.
To support its new allies in Europe, the U.S. passed the Selective Service Act in May of 1917 which drafted an army of about 3 million fighting men. By 1918 the U.S. was sending thousands of soldiers to fight in France.
The American Expeditionary Force, which was led by General Pershing, first saw action in 1918 in the Marne River Valley. Pershing refused to allow the AEF to be absorbed into the regiments of other nations, electing instead to keep the U.S. army separate.
In September of 1918 Pershing ordered an all-out frontal assault on the Saint-Mihiel region of France. Due to the high casualty rates these assault generated, other European powers refused to use them, which is part of the reason that the U.S. was so successful. The attack caught the Germans off-guard. This attack was followed by another attack in October through the Argonne Forest which helped contribute to the eventual German surrendered in late 1918.
The U.S. had a huge part to play in the Paris Peace Conference, where Wilson proposed his Fourteen Points in January, which included the founding of the League of Nations, forerunner to the U.N. The U.S. congress however refused to ratify Wilson’s treaty, and it died in committee in November.