It’s called conservation of energy. The system (the rider) can’t randomly gain energy without something else giving it energy because energy can’t be created or destroyed, only transferred. The pendulum example is beyond popular and you see physics professors doing it all the time. I think your teacher wants you to say it’ll continue forever, but I don’t think it will. The system will most likely lose energy to its surroundings. And there’s things like air resistance which will, overtime, slow it down. So no, it won’t go on forever