Did you know that U-boat (in German: U-boot) is an abbreviation of Unterseeboot, (“undersea boat”, a German submarine)?
The destruction of enemy ships by German U-boats was a huge part of World Wars I and II.
Germany was the first country to employ submarines in war as substitutes for surface commerce raiders.
At the outset of World War I, German U-boats, though numbering only 38, achieved notable successes.
The Armistice terms of 1918 required Germany to surrender all its U-boats, and the Treaty of Versailles forbade Germany to possess them in the future.
But in 1935 Hitler’s Germany renounced the treaty and forcefully negotiated the right to build U-boats.
So, Britain was ill-prepared in 1939 for a resumption of unrestricted submarine warfare, and during the early months of World War II the U-boats, which at that time numbered only 57, again achieved great successes.
Throughout WW II, The German U-boats began to operate in groups (called wolf packs by the British). One U-boat would shadow a convoy and summon others by radio, and then the group would attack, usually on the surface at night.
However, by 1943 the Allies improved their ability to detect and attack submarines under water and developed tactics to force them to the surface where they could more easily be destroyed. Over the last two years of World War II, the U-boat’s effectiveness never approached the level of success enjoyed in the first four years of the war, primarily because of these technological and tactical developments.
In World War II Germany built 1,162 U-boats: 785 were destroyed and the remainder surrendered.
Of the 632 U-boats sunk at sea, Allied surface ships and shore-based aircraft accounted for the great majority.
Source: https://www.britannica.com/technology/U-boat