The pendulum has two types of energy:
Kinetic Energy - the energy of movement;
Gravitational Potential Energy - the energy stored by the pendulum being above its lowest resting position*.
If you set friction to zero, you'll notice that while the levels of KE and PE are continuously changing, the total energy, KE+PE remains constant.
+
Why? What's happening?
What if friction isn't zero?

*There's also a little elastic potential energy stored and released due to the pendulum cord being stretched most at the bottom of its swing- but most cords aren't stretchy enough for this to be very important.
+Not quite. Even with zero air friction you'll notice that the pendulum's energy slowly diminishes. This is because the pendulum's cord isn't particularly elastic, and much of the energy that goes into stretching the cord at the bottom of its spring gets turned to heat energy.