Invented by German engineer Arthur Scherbius and patented in 1919, the Enigma was a machine that enciphered and deciphered secret messages, most notably used by the German government throughout the Second World War. While it was produced in a number of models and underwent many variations, the Enigma generally resembles a typewriter with a keyboard backed by a lampboard and a scrambling unit. Agreed-upon scrambler codes allowed operators to communicate with one another.
Link: How the Enigma Works