Some years ago, I worked several times (mostly unsuccessfully) to build a pendulum clock. I had no problems with the hand movements, the gearing, the weights, the pendulum, the structure; I had it all figured out. But I had lots of problems working out the escapement. An escapement is a device which converts continuous rotational motion into an oscillating or back and forth motion. This creates the familiar tick tock sound.
Very generally speaking, the pendulum, the weight and the escapement work together to create the power of the clock. The weight pulls on a drum which turns the escapement wheel. The escapement wheel transfers very small impulses of force to the pendulum to keep it swinging. The pendulum will always swing at a constant pace or period, thus a pendulum is a great way to keep accurate time.
The tricky part is creating an escapement that will work regularly, have enough power to keep the pendulum swinging, and not too much so the pendulum is over powered and swings wildly. YouTube user BenVanDeWaal seems to have this problem licked. It seems he has devoted his entire Lego building existence to building escapements, and I might say he has done a very nice job. He has several videos of several escapement types, but here are a few of my favs:
There are many more, and if you like these, go visit BenVanDeWaal's site.