The first military ENIGMA machine that the British codebreakers obtained was from the Polish Cipher Bureau, who provided it to the British when Poland fell to the Germans in September 1939). The Polish Enigma duplicate worked - they had successfully decrypted a large portion of Enigma traffic since December 1932 (the German military started using the system in 1928.) The Polish shared their system with the British and French in mid 1939.
This was , however, a 4 wheel machine, (rotors marked I, II,III, AND IV)and the German Wehrmacht had started using a 5 wheel machine( + rotor V) in December 1938. the German navy however heightened the security of their own cryptography by using an 8 wheel machine ( with additional rotors VI,VII, and VIII) .
In February 1940 the first of this later Enigma material consisting of rotors VI and VII, the wiring of which was at that time unknown, were captured from the crew of U-33 by the Royal Navy.
Then on 7 May 1941, the Royal Navy captured a German weather ship, together with complete cipher equipment and codes. They did it again shortly afterwards when two days later U-boat U-110 was captured.
The very first ENIGMA machine the British obtained was a commercial (3 rotor) version which was purchased through normal channels in 1927 which, whilst it enabled the codebreakers to understand its workings, was of no use when war broke out, for the reasons outlined above.