In mechanical clocks, this is the escapement, which gives precise pushes to the swinging pendulum or balance wheel, and releases one gear tooth of the escape wheel at each swing, allowing all the clock's wheels to move forward a fixed amount with each swing.
In electronic clocks this is an electronic oscillator circuit that gives the vibrating quartz crystal or tuning fork tiny 'pushes', and generates a series of electrical pulses, one for each vibration of the crystal, which is called the clock signal.
In atomic clocks the controller is an evacuated microwave cavity attached to a microwave oscillator controlled by a microprocessor
A thin gas of cesium atoms is released into the cavity where they are exposed to microwaves
A laser measures how many atoms have absorbed the microwaves, and an electronic feedback control system called a phase locked loop tunes the microwave oscillator until it is at the exact frequency that causes the atoms to vibrate and absorb the microwaves
Then the microwave signal is divided by digital counters to become the clock signal.
In mechanical clocks, the low Q of the balance wheel or pendulum oscillator made them very sensitive to the disturbing effect of the impulses of the escapement, so the escapement had a great effect on the accuracy of the clock, and many escapement designs were tried
The higher Q of resonators in electronic clocks makes them relatively insensitive to the disturbing effects of the drive power, so the driving oscillator circuit is a much less critical component.
This counts the pulses and adds them up to get traditional time units of seconds, minutes, hours, etc
It usually has a provision for setting the clock by manually entering the correct time into the counter.
In mechanical clocks this is done mechanically by a gear train, known as the wheel train
The gear train also has a second function; to transmit mechanical power from the power source to run the oscillator
There is a friction coupling called the 'cannon pinion' between the gears driving the hands and the rest of the clock, allowing the hands to be turned by a knob on the back to set the time.
In digital clocks a series of integrated circuit counters or dividers add the pulses up digitally, using binary logic
Often pushbuttons on the case allow the hour and minute counters to be incremented and decremented to set the time.
This displays the count of seconds, minutes, hours, etc
in a human readable form.
The earliest mechanical clocks in the 13th century didn't have a visual indicator and signalled the time audibly by striking bells
Many clocks to this day are striking clocks which strike the hour.
Analog clocks, including almost all mechanical and some electronic clocks, have a traditional dial or clock face, that displays the time in analog form with moving hour and minute hand