The swinging pendulum can either possess the kinetic energy or potential energy.
When the bob is at position B it possesses only the potential energy and not the kinetic energy. When it moves towards the point A its potential energy goes on decreasing. And kinetic energy goes on increasing.
When it reaches at point A it possesses only kinetic energy.
When it again tends to move towards the point C kinetic energy starts getting converted to potential energy.
Thus at extreme positions B and C, the potential energy is maximum. While at mean position kinetic energy is maximum.
Thus the total energy at every instant of a time is constant. This proves the law of conservation of energy.