One of the actual Enigma machines smuggled out of Poland in 1939
From an intelligence point of view, the war started badly for the Germans by having their codes broken. It went downhill from there. Every agent they sent to Britain was caught and turned, feeding bad information back to their masters. The German military intelligence service was full of anti-Nazis occasionally in touch with the Allies. SS and police intelligence services under Himmler were totally ineffective. Stalin had a cabinet level spy in the German government and occasionally knew about Hitler's decisions before the Whermacht high command. The British were wildly successful with numerous operations designed to deceive or confuse the Germans.
But it all started with Enigma. The Enigma was a portable cipher machine used by all branches of the Third Reich military and diplomatic corps. It was widely thought to be unbreakable and so coded messages were routinely sent via radio. However, the Poles started breaking Enigma messages in 1933. Thereafter, they steadily improved their ability to decode military messages and topped their efforts by stealing several machines. The machines were smuggled to England in September 1939, and one of these is pictured above. There were numerous variants of the machine and each had to be broken separately. The models used by the German Navy were particularly difficult to crack.
The Allies mounted a massive effort to break en-masse the thousands of Enigma coded messages sent by the Germans daily. To facilitate this industrial-level decryption, they built the first computer, Colossus. The intelligence derived from this code-breaking was called ULTRA and its existence kept secret until the 1970's. Colossus was not fully de-classified until 2000. Other secrets remain. The identity of Stalin's spy, for example, has never been disclosed.
There's a loving article at Wikipeida including links to online Enigma simulators.