There are two main ways in which this is true.
First, the war at sea helped to defeat the Germans because the German strategy of blockading Britain did not work. Germany hoped that it could use its submarines to choke off shipping to Britain. Britain was very reliant on supplies that it received from overseas. Therefore, an effective blockade of Britain would have harmed England’s war effort severely. However, the German blockade was not completely effective. England’s war effort remained strong, helping to defeat Germany in 1918.
Second, the war at sea helped to bring the Americans into the war. The Americans did not like the unlimited submarine warfare that the Germans had been waging. Germany decided to ignore American wishes and to try to intensify their submarine warfare so as to put England out of the war. This helped to bring the US into the war. The large numbers of soldiers and materiel that the US was able to throw into the war helped to break the stalemate on the Western Front.
Thus, the war at sea helped to defeat the Germans in two different, but related, ways.