When released, the bob oscillates in SHM in a vertical plane and the energy oscillates back and forth between kinetic and potential, going completely from one form of energy to the other as the pendulum oscillates. In the case of undamped SHM, the motion starts with all of the energy as gravitational potential energy. As the object starts to move, the gravitational potential energy is converted into kinetic energy, becoming entirely kinetic energy at the equilibrium position. The velocity becomes zero at the other extreme as the kinetic energy is completely converted back into gravitational potential energy,
and this cycle then repeats.