The message is typed in like on a typewriter. Each time a key is hit, current flows through the contacts in the scrambler unit and illuminates a lamp with the enciphered letter showing. Little notches on the rotor's sides take care of that. To decrypt a message, one needs not only an Enigma machine, but also the knowledge of the starting state, i.e. at which positions the wheels were when the text was typed in. To decrypt the message, the machine must be set to the same starting state, and the cipher text is entered.
Output is the plain text.
17,576 possible starting states. To enhance the security of Enigma, five rotors with different internal wirings were in use. Any three of these could be used in the machine in any order. The rotors had letters on their outer rim. This rim was moveable, giving the ring positions.