A pendulum rocks back and forth. In an ideal setting, this motion would go on perpetually without loss of mechanical energy. Realistically, if you held a pendulum up and made it go in motion, it would slow to a stop.
What is responsible for the pendulum gradually losing mechanical energy? Ignore the mass of the string holding the pendulum bob in motion.