The United States was lucky in World War I (and in World War II, for that matter) because it was one of the few combatants that could not be hurt on its own soil. The US was too far away from Europe to have any of its civilians harmed on home soil. However, there were American civilians who did get killed in the war. These were civilians who happened to be on ships that were torpedoed and sunk by German submarines.
One of Germany’s major strategies in the war was to cut Britain off from trade. Britain, of course, relied heavily on trade since it was an island nation. It relied on trade with its empire as well as with countries in the Americas. It had a huge merchant fleet. The Germans wanted to cut off this trade so as to prevent the British from having the resources needed to fight. They could generally not do this with surface ships because the Royal Navy was too strong, so they used submarines.
The type of warfare that killed American civilians was called “unlimited submarine warfare.” In this type of warfare, submarines would sink merchant ships on their way to Britain without warning. This led to the loss of American lives.