There are several reasons why a clock keeps stopping. It may have worn out parts, broken parts, or simply need a good cleaning. These are issues that can be addressed by your local clockmaker. If the clock is in working condition but still will not keep running, it is out of beat. This is a problem you may be able to solve on your own.
When a pendulum regulated clock is running well, you will hear it tick. The loudness of the ticking will vary among clocks, but a clock in beat will produce a even "tick tock" sound. The "tick" and the "tock" will have an even rhythm between them. One will not sound longer than the other. A clock that is not in beat will have an uneven rhythm in the the ticking and will run no longer than 10 or 15 minutes.
To put a clock in beat, you can have a clockmaker come to your house to adjust either the pallets or the crutch. However, he will charge a service fee. Another solution is for you to try to level the clock to where it is in beat. This is possible with a wall or mantel clock, but a grandfather clock is going to require the attention of the clockmaker.
For a wall clock
Start the clock and listen to the ticking. Much like straightening a picture on the wall, tilt the clock to the left or right while listening to the beat. Does it sound worst or stop all together? Tilt the clock in the other direction. Keep adjusting the clock to the left or right until you achieve an even beat. If it keeps running, congratulations! You've just avoided a service call.
For a mantel clock
The clock must be level from side to side and front to back. First level the clock from front to back so that the pendulum is not rubbing either the back of the case or the rest of the clockworks. The pendulum must swing without rubbing of hitting anything or the clock will stop. Next, start the pendulum swinging and listen to the ticking. If the ticking is uneven, lift the right side or left side of the clock listening for an improvement in the beat. When you have decided which side needs to be raised, use card stock or coins under the feet to keep that side at the correct height. Verify your adjustments by listening for an even beat. If it keeps running, congratulations! You too have just avoided a service call.