Why did America go into war in World War 1?

Germany would sink anything that came near its territory using a submarine called a u-boat and then the Lusitania, a ship from America sank from the submarine.