Digital and analogue clocks essentially only differ from each other in the way the time is displayed. The way they work is largely identical.
Briefly explained: digital clocks usually use a quartz movement to measure time. An oscillating quartz is made to oscillate by means of electrical voltage. The resulting oscillations are translated into a second cycle, which is then transmitted to the display instrument by means of electrical impulses. The display instrument now shows the time. The display instrument can take various forms. Most modern digital clocks have an LCD display.