In World War 2, as they did in World War 1, submarines were widely used by both sides as the ultimate weapon of naval blockade, sinking large numbers of both merchant ships and warships, resulting in either paralyzing the enemy's military industry and war effort by causing severe shortages of war materials and products and preventing maritime troop transfers, or forcing the enemy to dedicate enormous resources to anti submarine warfare in order to prevent that from happening, resources which could otherwise be used in the enemy's main war effort.
Either way, the submarine is the classic weapon of the war of attrition, where victory is achieved by the side which inflicts significantly more losses in men and material to the enemy than it suffers, and monthly ship tonnage loss counts reflect success or failure better than battle maps. The submarine's ability to attack almost anywhere and anytime, in total surprise and with devastating results, makes it a highly efficient weapon, in which a small crew of about 40 to 80 sailors can do more damage than 1000 sailors in a battleship, and for a fraction of the cost, and a much larger anti-submarine force is required in order to efficiently fight the submarine.
The same features of the submarine also make it the perfect blockade runner, capable of quietly smuggling secret agents and commandos, or small amounts of high importance cargo, to and from almost any enemy beach or a blockaded harbor, making the submarine one of the main vehicles of intelligence and special forces warfare.
Unlike the post war nuclear submarines, World War 2 submarines had quite limited underwater speed, range, and endurance. They usually sailed on the surface, especially at night, and submerged only when they had to, to avoid being detected and attacked. In the first years of the war, German submarines even made group night attacks while surfaced, as if they were surface torpedo boats. As RADAR and aircraft were more widely used to detect and attack submarines, they were forced to remain submerged most of the time, and new technical and electronic improvements were invented, mostly by the Germans, to significantly improve the submarine's underwater performance, and to enhance its awareness to nearby danger.
German submarines were called U-boats (U for Underwater), and their success in World War 1 against British shipping was such that after its defeat Germany was not allowed to have any submarines. In 1935, Germany ignored it and began to rebuild a new submarine force, under the command of a former World War 1 U-boat captain, Karl Doenitz. A brilliant, innovative, and experienced tactician and submarine commander, Doenitz advanced submarine warfare to new heights, trained highly skilled crews and captains, and developed devastating new tactics, mainly the Wolfpack tactic which allowed a group of submarines to efficiently coordinate and concentrate their effort instead of fighting alone.
In the Wolfpack tactic, the submarines first spread across a long stretch of ocean to enhance their probability of detecting passing enemy ships, and when one of the submarines detected a convoy of enemy ships, instead of immediately attacking it alone, it reported its position and course and followed it, and the other submarines first slowly regrouped to a position ahead of the enemy convoy, and only then attacked it together, preferably at night, overwhelming or even outnumbering the convoy's anti-submarine escort warships and sinking many more ships.
The devastating implementation of such tactics by the German U-boats, and systematic ongoing analysis of results and adaptation to changes, made Doenitz and his submarines the most formidable enemy Britain faced, more worrying even than the Luftwaffe. Winston Churchill said that the only threat that really worried him during World War 2 was "The U-boat peril".
The only thing that saved Britain from being suffocated early in the war by the German U-boats, were Doenitz's superiors.
As a result, Hitler and Roeder (head of the German Navy) confidently rejected Doenitz' pre-war warnings that Germany has too few submarines to achieve their task of cutting Britain's maritime life line, and instead of having 300 submarines at the beginning of the war as he wanted, he had just 55, and only 12 could be active in atlantic operations.
Explanation: The experienced Doenitz calculated that considering the submarines sailing to and back from the area of operations, submarines used for training new crews, and submarines being resupplied and repaired in German harbors, he needed 300 submarines in order to have 100 submarines active in the area of operations near Britain.
Even after the war started, it took a long time before the U-boats were allowed to fully exploit their devastating potential and before their rate of production was significantly raised to compensate for losses and increase their numbers. In 1943 Doenitz was also promoted to head of the German Navy and submarine production was dramatically increased, but it was too late. The German U-boats then faced much stronger anti submarine forces, which were equipped with new technologies, new tactics, a new commander, Admiral Max Horton, a former submarine captain and commander of the British submarine force, who knew best how to fight against submarines, and by then merchant ships were produced in America faster than the U-boats could sink them. In May 1943 Doenitz lost 41 U-boats in 3 weeks. The hunters became the hunted. The U-boat activity expanded to the South atlantic, to the US East coast, the Carribean, and the Mediterranean, but the main battlefield remained the North atlantic sea routes to Britain, and there they lost the battle.
Until the end of 1942, the Germans sunk an average of 14 ships for each submarine lost. Since 1943, the rate dramatically reduced and submarines losses were very high. During the war they sunk a total of 3000 allied ships, mostly merchants, 14.5 million tons of shipping, and lost almost 800 submarines, which is about 80% of those which participated in operations, and 2/3 of the total of 1170 U-boats produced.
The Italian and Japanese navies had large submarine fleets when the war began. The Italian submarine warfare was not very efficient, except in the operation of underwater divers, detailed later in this essay, a highly efficient method of underwater warfare which they invented and excelled in. The Japanese built remarkable submarines, but misused them. They used submarines mostly in cooperation with surface warship groups and mostly against enemy warships, which are much harder targets than merchant ships. As a result, their submarine achievements were low.
British submarines were a secondary force in the large Royal Navy. They mainly attacked Axis warships, including sinking 39 German submarines, and participated in many intelligence operations, but their main strategic contribution was made by a small force of smaller coastal submarines which operated from the heavily attacked tiny island of Malta in the center of the Mediterranean Sea. This small force kept sinking the Italian supply ships which provided fuel and other equipment to the German-Italian forces which fought in North Africa, and the increasing shortages this caused limited the abilities of these Axis forces and eventually led to their defeat.
After the attack on Pearl Harbor, the US Navy initially had two main forces, the few aircraft carriers, and the submarines. While the aircraft carriers were given the task of destroying the Japanese Navy, especially the Japanese carriers, the main task of the American submarines, just like the German U-boats, was to suffocate Japan's military industry, cut its oil supply, starve it, and prevent mass troop movements by sea, all by sinking the Japanese merchant fleet on which it was so dependent as a nation of islands.
Initially the American submarines suffered severely from faulty torpedoes and other problems, but when the problems were finally fixed in mid 1943, the US Pacific submarine force had tremendous achievements, efficiently doing its job and also secondary tasks such as rescuing downed airmen. They sunk almost 1300 Japanese merchant ships, and many warships, for a loss of 52 submarines of a total of 288, a remarkable achievement which was aided by the fact that unlike the British, the Japanese neglected to properly escort and protect their merchant ships until the end of the war.