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.