Click on image to enlarge and see more detail.
The exterior of a wheellock mechanism from a "puffer" or pistol of about 1580. (Photo by Nick Michael / Wikipedia)
The wheellock was a major step forward in the development of firearms. It was the first pistol always ready to fire (if it was loaded with powder and ball). The user of earlier pistols -- the matchlock -- had first to insert a burning rope fuse before a session of firing.
The mechanism is so-called because it uses a rotating steel wheel to provide ignition. Developed around AD 1500, it was used alongside the matchlock and was later superseded by the snaphance (1560s) and the flintlock (c. 1600).
The wheellock works by spinning a spring-loaded steel wheel against a piece of (iron) pyrite to generate intense sparks which ignite gunpowder in a pan, which flashes through a touchhole to ignite the main charge in the barrel. The pyrite is clamped in the vise jaws on a spring-loaded arm or 'dog' which rests on the pan cover. When the trigger is pulled the pan cover automatically opens and the wheel spins as the pyrite is pressed into contact.
A wheellock firearm can be instantly readied and fired even one-handed, in contrast to the then-common matchlock firearms which must have a burning cord of slow-match ready if the gun might be needed, and which demand the operator's full attention and two hands to operate. The wheellock mechanism is complex to make which made it relatively costly.