The enigma military coding system was used by the German armed forces from before WWII. It was generally believed to be unbreakable as it relied on having two coding machines and a random setting of variables which were changed daily.

However the German armed forces had made one miscalculation. They required units to send in daily situation reports. If nothing to report they used a standard phrase and it was through these phrases that the code-breakers got their insight into the settings of the code for that day. This had first been discovered by a group of Polish code-breakers but their method was time-consuming and required multiple sheets of paper to work out. This information had been supplied by the Polish intelligence service to the British secret service and they passed this to the team at Bletchley who devised a quicker way of verifying the code settings. To do this they used a machine called a ‘Bombe’ which was able to rapidly (in about 30 minutes) cycle through all the possible setting permutations based on the construct made from the repeated messages.

If it found that they all worked out, it would stop running and the settings could be read off and transferred to a checking machine where a cypher would be entered using the settings suggested. If a clear message (in German or Italian) was produced then it was likely that those were the settings for that day and all further traffic could be de-cyphered using these settings. If not then the Bombe was set up again and re-run until a solution was found. This process was repeated each day.
Once de-cyphered the information was translated and passed to the Intelligence people for action. Judicious use of the information gained from the Enigma intercepts meant that the German armed forces never realised that it had been broken and they continued to use the system throughout the war.