U-boats were naval submarines operated by Germany, particularly in the First and Second World Wars. Although at times they were efficient fleet weapons against enemy naval warships, they were most effectively used in an economic warfare role (commerce raiding) and enforcing a naval blockade against enemy shipping. The primary targets of the U-boat campaigns in both wars were the merchant convoys bringing supplies from Canada and other parts of the British Empire, and from the United States, to the United Kingdom and (during the Second World War) to the Soviet Union and the Allied territories in the Mediterranean. German submarines also destroyed Brazilian merchant ships during World War II, causing Brazil to declare war on both Germany and Italy on 22 August 1942.
(More on Wiki HERE)