The Enigma machine was a World War II era encryption device used by the German army. It was the subject of substantial efforts by Allied cryptographers which finally resulted in the successful cracking of the code, which led to decryption of German military comms.
We found this website which allows you to encode and decode messages using an online version of the Enigma encryption engine. It’s sponsored by the Enigma World Code Group.
While the Enigma World site does not deal with the technical specifics of how the machine worked, you’ll want to check out their links page for other sites covering the technical aspects, including a link to a C++ library for simulating the Enigma machine.