The Battle of the Atlantic was ultimately won by the Allies in World War II, mostly because of the overall German surrender. More properly termed a campaign, this "battle" lasted from 1939 until the end of the war in 1945.
Over the course of these six years, "wolf packs" of German U-boats scoured the Atlantic Ocean looking for Allied convoys transporting troops and equipment or resupplying besieged Great Britain and the Soviet Union. When a ship was spotted, U-boats converged upon it like a pack of wolves to sink what they could. At the Germans' most successful point in 1942, they sank 1,664 Allied ships, most of them crewed by the British Merchant Navy. Anti-submarine aircraft, improved aircraft carrier tactics and improved radar technology all contributed to the Allies' increasing victories over this tactic.