How do grandfather clocks keep going? The pendulum is what makes the clock go. However, the pendulum will slow down due to friction. What energy source keeps the pendulum from eventually stopping?
The premise of your question is incorrect: in fact, the pendulum is what keeps the clock from running! And the clock keeps the pendulum running!
A clock is essentially a motor: a device that uses energy from some source to drive the hands of the clock around and around. The source of the energy varies; it could be a tightly wound spring, or a weight dropping down after being raised to some height. The energy is dissipated in the friction in the various gears that are used to reduce the speed of the motor for the different hands. The speed of this motor would depend only on the friction in the various gears...
The role of the pendulum is critical. In part of its motion back and forth, it stops the gear train from moving. As the pendulum moves further in its swing, it releases a tooth of the gear, which rotates a little until another part of the pendulum catches another tooth. So each swing of the pendulum allows the clock "motor" to rotate only a fixed number of teeth (usually one tooth exactly)
Here's a simple example of an escapement:
The next trick is to have the teeth of the gear give a little push to the pendulum as each tooth is released. This compensates for the friction in the pendulum which would otherwise stop the pendulum in a few hours. So the energy source in the clock is keeping the pendulum swinging, as the pendulum regulates the rotation of the gear...
They do stop without intervention. Grandfather clocks have to be reset. They are designed so that you can wind them back up.
Most have holes/keys around here where they can be winded back up.
Most are made to be able to go about a week without winding.
"Traditionally, longcase clocks were made with two types of movement: eight-day and one-day (30-hour) movements. A clock with an eight-day movement required winding only once a week, while generally less expensive 30-hour clocks had to be wound every day. Eight-day clocks are often driven by two weights – one driving the pendulum and the other the striking mechanism, which usually consisted of a bell or chimes. Such movements usually have two keyholes on either side of the dial to wind each one (as can be seen in the Thomas Ross clock above). By contrast, 30-hour clocks often had a single weight to drive both the timekeeping and striking mechanisms. Some 30-hour clocks were made with false keyholes, for customers who wished that guests to their home would think that the household was able to afford the more expensive eight-day clock. All modern striking longcase clocks have eight-day movements. Most longcase clocks are cable-driven, meaning that the weights are suspended by cables. If the cable was attached directly to the weight, the load would cause rotation and untwist the cable strands, so the cable wraps around a pulley mounted to the top of each weight. The mechanical advantage of this arrangement also doubles the running time allowed by a given weight drop."