When a pendulum is displaced from its equilibirum position, there will be a restoring force (due to the weight) that will accelerate the pendulum back to the equilibrium position. Try deriving the second order ODE that would model such a situation using Newton's Second Law of Motion.

After that, move on to view the simulation. Have fun!