U-boats were German submarines that caused havoc in World War Two during the Battle of the Atlantic. U-boats were so damaging that Winston Churchill commented that it was the only time in World War Two that he thought Britain would have to contemplate surrendering.
The Treaty of Versailles had forbidden Germany from having any submarines. To get round this, German submarine crews trained in Spain and Russia. Crews also trained in anti-submarine warfare (which Versailles did not forbid) in Germany and the very nature of this meant that they had to gain knowledge of submarines themselves. Either way, by 1939, Germany had nearly 50 operational U-boats for the war. Ten more had been built but were not fully operational in September 1939.
Germany had a well respected short history of submarine building. The success of the German submarines during World War One had been startling and at the end of the war, those U-boats that had survived were surrendered to the Allies. Britain, America, Japan etc all took their share of the U-boats and used them as templates for their own versions. In 1923, Britain launched her X1 submarine which was based on the uncompleted U173 class of German submarine.
From 1918 on, Germany was technically not allowed to have submarines or submarine crews. However, no mechanisms were in place to stop research into submarines in Germany and it became clear that during the 1930's, Germany had been investing time and men into submarines. During the same time, Britain had built 50 submarines, America 28 submarines and France 83. Even Russia, during the wars, had built over 100 submarines despite the political dislocation that country had suffered. Many of these submarines were designed by Germans - both Germany and Stalin benefited from this as Russia got the submarines she so desperately needed and Germany got the design experience.,,,,,,,,,,,,,,