America had, in the first two and a half years of WWI, adopted a policy of neutrality and though that attempted to broker peace between the Central Powers (Austria-Hungary, Germany, Bulgaria and the Ottoman Empire) and the Allies (United Kingdom, Serbia, Russia, France, Italy and Belgium). However the cumulative effect of German use of U boats on American ships (the Lusitania being the most high profile) and the discovery in early 1917 that Germany were conducting secret negotiations with Mexico to form an alliance meant that the American position of neutrality became untenable.
Thus, on 6 April 1917, the United States Congress issued the following:
WHEREAS, The Imperial German Government has committed repeated acts of war against the people of the United States of America; therefore, be it resolved by the Senate and House of Representatives of the United States of America in Congress assembled, That the state of war between the United States and the Imperial German Government, which has thus been thrust upon the United States, is hereby formally declared; and that the President be, and he is hereby, authorized and directed to employ the entire naval and military forces of the United States and the resources of the Government to carry on war against the Imperial German Government; and to bring the conflict to a successful termination all the resources of the country are hereby pledged by the Congress of the United States.
America may have declared war but they were not properly prepared for it. Like the UK in 1914, the US army was small and it was necessary for conscription to be introduced in May 1917 to bolster their numbers. Nevertheless, the first 14,000 American troops arrived at St Nazaire in France on 26th June 1917.
Amongst those men was John Figarovsky, of the 1st Infantry Division, who recalled:
When we landed one of the first things we did is to parade through the town. We paraded through St. Nazaire and the French people were just so delirious with joy, because in the Americans they saw hope for the future, that we might, you know, end the war quicker with the Americans coming there. As we marched through town, the sidewalks and even the gutters on both sides were full of people, and we felt so proud and important that such a fuss was being made over us. We were most of us young, and looking forward to the fight, and we didn’t know how serious war is because we had never been in war before. To us it was just one big adventure ahead of us.

The US Navy was also mobilised, with the first of their battleships arriving in Scapa Flow in November 1917.
That said, it wasn’t until spring 1918 that the bulk of the American military was active on the fronts of World War One. The German Spring offensive, also known as the Kaiserschlacht, which started on 21 March 1918 was the Central Power’s attempt to defeat the Allies before America could swing the war in the Allies favour.
An excellent overview of America’s full involvement in WWI, with quotes and audio from the men themselves (including the quote I have used above), can be found here in the Voices of War section of the IWM website.