The basic mechanical clock machine used printed time cards with little checkboxes that indicated time in and out.
Every employee received a card and was required to insert it in the machine each time they arrived at work or left. You can get more information about time & attendance solutions from online sources.
After the card was inserted with the appropriate checkbox aligned, a lever was pulled to turn the clock. An inked ribbon was used to print the time stamp in the box.
Some models used a tailwheel instead of cards. Each employee dialed his/her own number and the time was noted. This was easily abused by other employees and the 'key clock' was created. Each employee was given a key to record his comings and goings.
A timesheet was created for employees as the clocks got more advanced. This timesheet was then fed into the machine, which activated the device at the back of it that printed the date and hour on the paper.
Eventually, punch cards gave way to magnetic strip cards which are still in widespread use today. They can be used to commit fraud as the employee is not able to be identified by the machine but only his card.
These biometric time clocks can be used to recognize any number of recognition systems such as voice recognition, fingerprint recognition, retinal scan recognition, and vein pattern recognition.
The most common payroll clock type is the one that recognizes your fingerprints. These rules eliminate all frauds such as "buddy punching", where employees check a friend in and out to do a favor, even though he isn't there.