If we are discussing WWI, America was committed to neutrality. We believed that it was an empirical war, and it did not involve us. This changed when Britain stopped all American goods trying to be shipped to Germany through the North Atlantic. They called American goods contraband, even though the waters were technically considered free international waters.
We did not immediately act, and tried to continue to be neutral. But over the next two year (1914-1916), American shipped were seized and trade between Germany and the U.S. dwindled.Germany retaliated and used submarines in the area and warned that they would sink any enemy ships. The U.S. was not excluded from this threat.
Once Germany started using their U-boats to sink British and American ships, people started dying. In 1915, a German U-boat sunk a British passenger boat that was carrying over 1200 people (128 Americans). Although the ship was carrying ammunition, Americans did not think that was excuse enough to sink the boat.