A U-boat is a military submarine used by Germany. German submarines were most active in the First Battle of the Atlantic in World War I and the Battle of the Atlantic in World War II. Although they could be very effective as weapons against enemy warships, they were most effective in economic warfare (commerce raiding) and enforcing naval blockades against enemy shipping.

The name is an abbreviation of the German Unterseeboot ("undersea boat").[1] In English, U-boat refers exclusively to the German vessels used during the World Wars. In German, however, the term U-Boat refers to any submarine, including military and civilian ones and modern and foreign ones. Austro-Hungarian Navy submarines were also known as U-boats.
Hundreds of U-boats went to war. Most of the sailors made repeated trips to sea until their boat was sunk by Allied anti-submarine warfare. They are depicted in books and movies including the 1981 Das Boot. Six U-boats were captured with most of their crew and with equipment and papers that helped the Allies to read the messages of the Enigma machine.