A pendulum is a weight suspended from a pivot so that it can swing freely. When a pendulum is displaced
Displacement (vector)
A displacement is the shortest distance from the initial to the final position of a point P. Thus, it is the length of an imaginary straight path, typically distinct from the path actually travelled by P...

 from its resting equilibrium position
Mechanical equilibrium
A standard definition of static equilibrium is:This is a strict definition, and often the term "static equilibrium" is used in a more relaxed manner interchangeably with "mechanical equilibrium", as defined next....

, it is subject to a restoring force
Restoring force
Restoring force, in a physics context, is a variable force that gives rise to an equilibrium in a physical system. If the system is perturbed away from the equilibrium, the restoring force will tend to bring the system back toward equilibrium....

 due to gravity that will accelerate it back toward the equilibrium position. When released, the restoring force combined with the pendulum's mass causes it to oscillate about the equilibrium position, swinging back and forth.