The Enigma machine & it counterbalance was a secret during the war and its story faded into obscurity. Designed by the Germans after world war 1, the machine designed liked a typewriter sent coded messages from one machine to another. It worked by the operator typed in a message then the machine scrambled the letters by means of notched rotors, which could produce billions of combinations. The only means to decode was by another enigma machine. The original inventor, Arthur Scherbius, was hopeful it would have a commercial value; the German high command realised its value and by 1928 the German navy had its own version, followed by the German army in 1933. Confident they were a secure way of sending secure information the Germans used the machine for for top secret messages.
In 1931 the allies became aware of the machine but cryptologists could not crack the code. In the years 1933-1938 the Germans were unaware that the Polish Cipher Bureau had unlocked the machine and even built copies. This information they shared with the British government in 1939 just prior to the invasion of Poland.
Bletchley park became the cipher school and center and it is here that top mathematicians and problem solvers came together to work on the enigma messages. They built ‘bombes’ huge computers, including the Colossus, to manage the huge output of enigma settings. Alan Turing was one of the mathematicians. Ultra was the term given to any intelligence gained from an Enigma message.
The excellent film released in 2014 starring Benedict Cumberbatch, The Imitation Game; reminded people of the work that went on behind the scenes, the unsung heros but they took quite a bit of movie license in the making.
Other films has mentioned the Enigma have included U-571 (2000)that whilst being popular in the States was not well received by the British as it was the British Navy in 1941 who captured the first Enigma Machine. Again do not learn your history from films, it reflects its own messages not necessarily the truth.