Britain, as an island nation, has always been highly dependant on sea-going trade. During WWII this was even more the case, and Britain needed to import over 1 million tons of supplies every week to be able to feed and equip its population and war machine.
The day that war was declared between Britain and Germany, the first action of the naval campaign started. British naval vessels dredged up, and cut German transatlantic communication cables, forcing the Germans to communicate to their interests in the Americas by less secure means for the rest of the war.
Much of the early action by German forces involved mining convoy routes and ports around Britain. The U-boat fleet, which was to dominate so much of the battle of the Atlantic, was very small at the beginning of the war. Mines could be laid by boats, aircraft, and also submarines.
The mining was highly effective, and initially involved the use of contact mines, which meant that a ship had to physically strike on of the mines in order to detonate it. The use of dredging and nets was effective against this type of mine, in the clearing of harbors, but nonetheless was time-consuming, and involved the closing of harbors whilst it was completed.
Into this arena came a new mine threat. Most contact mines leave holes in ship's hulls, but some ships surviving mine blasts, were limping back to port with buckled plates, popped rivets, and broken backs. This new mine was judged to be detonating at a distance from the ships, and doing the damage with the shockwave of the explosion. These mines were devastating; often ships that had successfully run the gauntlet of the Atlantic crossing were destroyed entering harbors on Britain's coast. More shipping was now being lost than could be replaced, and Churchill ordered that the recovery, intact, of one of these new mines was to be given utmost priority, that one should be recovered for study whatever the cost.
Then the British experienced a stroke of luck. A German mine was dropped from an aircraft laying mines onto mud flats in the Thames estuary. As if this was not sufficiently good fortune, the land happened to belong to the army, and a base, including men and workshops were close at hand. Experts were quickly dispatched from London to investigate the mine. When they disarmed the mine they discovered a previously unknown type of detonator mechanism, so they had a good idea that they were on to one of the new mines. What they didn't realise at the time was that the safety pin on the mine had not been removed before it was dropped; another piece of incredible good fortune.
The mine was rushed to labs at Portsmouth, where scientists discovered a new type of arming mechanism inside. The arming mechanism had a sensitivity level that could be set, and the units on the scale were milligauss. Gauss is a measurement for the strength of a magnetic field, and so they knew that they had a new type of mine, and also why it went off before coming into contact with the ship.
By using the detector from the mine, they were able to study the effect of a ship passing over it. A ship, or any large ferrous object passing through the earth's magnetic field will concentrate the field at that point. The detector from the mine measured this effect, and was designed to go off at the mid-point of the ship passing overhead.
From this crucial data, methods were developed to not only clear the mines (by passing strong electrical currents through the sea to induce a magnetic field, and set of the mines from a safe distance), but also to reduce the effect of the ship upon the earth's magnetic field. This was known as de-gaussing, and proved highly effective in preventing shipping losses due to mines. Many of the boats that sailed to Dunkerque were de-gaussed in a marathon four-day effort by hard-pressed de-gaussing stations.
However, now the U-boats were being produced faster and faster, and with the fall of France, they had direct access to the Atlantic ocean. Huge fortified concrete ports for the U-boats were built, which resisted any successful bombing throughout the course of the war. The U-boats preyed on the Atlantic convoys that were supplying Britain from the US initially as cash and carry, and later under the lease-lend program.
The U-boats were spectacularly successful, and the U-boat crews were heroes to the people in the motherland. They easily preyed on the convoys, in the wide space in the Atlantic where protecting airplanes did not have the range to fly. Although the convoys had destroyer escorts, the speed of the U-boats, and the confusion caused in a large convoy under attack enabled them to inflict huge damage with little retaliation suffered. The U-boat crews called this the 'happy time'.
However, a number of technical developments looked set to aid the allies. Firstly, new depth charges were developed that fired in front of the destroyers rather than simply dropping them over the side as the destroyer passed over. The sonar contact was lost directly underneath the boat, and the U-boats often used this to escape. In addition, depth charges were fired in patterns, to 'box' the enemy in with explosions. The shockwaves would then destroy the U-boat by crushing it in the middle of these explosions. A device used to achieve this was called 'Hedge-hog', a nick-name derived from the firing spindles. This fired twelve charges at precisely timed and angle trajectories to hit a point in front of the ship.
Aircraft ranges were also improving all the time, but to plug the gap, some larger merchant vessels were fitted with cheap fighters (usually Mosquito's) on catapults. These fighters could only be used once, but they could take on a surfaced U-boat.
One of the most significant developments was improved direction finding radio equipment. A new design, which enabled the operator to instantly see the direction of a broadcast was introduced, and as U-boats had to surface to radio, they gave their positions away. A destroyer could then engage the U-boat, preventing a coherent attack on the convoy.
Shipping losses came down and down, until the US joined the war, by declaring war against Japan in retaliation for Pearl Harbor. Germany declared war on the US before the US decided what it was going to do in the European theatre, and promptly declared open season on US shipping.
The US, having no direct experience of modern naval war on it's own shores, did not employ shore-side black-outs, of use proper convoy methods. The U-boats simply stood off the shore of the eastern sea-board and picked off boats as they were silhouetted against the lights of the coast. The Carribbean also provided rich pickings for U-boats, and they called this the second happy time.
However, the tide was to turn again. Regular air patrols could take advantage of the clear water of the Carribbean, and bombed the U-boats. Air support, and convoy protection was now more advanced, and longer-range. They also had the full-resources of the US fully (rather than de-facto) supporting this allied effort.
The next major breakthrough was the development and use of radar to detect U-boats. Even early radar showed astonishing accuracy, and could pick up a surfaced boat from many miles. The aircraft using the radar sets had such good results, that any approaching aircraft was enough to make a U-boat crash-dive. With the increasing range of aircraft eventually leading to no gap over the Atlantic towards the end of the war, U-boat losses became huge, and the chances of a crew surviving a tour of duty became frighteningly small. With the resources of the US to support her for as long as needed, Britain was in an unassailable position, and the end was inevitable.