I understand that perpetual motion is impossible, but I became confused when a friend of mine told me that the orbits of the planets is an example of perpetual motion. Will earth's orbit ever end, and whats wrong with his statement. I'm asking for a simple answer to 'disprove' my friends 'theory'.
Perpetual motion is a system that produces work (energy) while maintaining its state (which implies it can forever produce energy without changing state).
Orbiting planets are not a perpetual motion system. NOTHING we know of or can explain is a perpetual motion system.
Orbiting planets APPEAR to be a perpetual motion system, because the length of time needed for an OBSERVABLE (measurable) state change to occur is enormous (many, many, many, many lifetimes).
Actually, what is impossible is a perpetuum mobile which is a machine or system that breaks the first or second law of thermodynamics. Planetary motions break none of those laws, therefore there is no contradiction with their "perpetual motion".
The question of the end of Earth's orbit is a different one though. Certainly, the Earth's orbit will end, most likely because the Sun will engulf the Earth as it grows to a red giant. If it doesn't end sooner.
Strictly speaking, planetary orbits are not perpetual motion. As the planet (and their star) rotate around their common center of gravity, they emit gravitational waves. Those gravitational waves drains the planet/star orbital system on energy so the planet eventually get's closer and closer to its star.
Now this orbital decay due to gravitational wave emission is ridicoulusly small so it has only been measured for extreme systems like binary neutron stars (which are heavy and may orbit each other within minutes, seconds or just a fraction of a second). Our planet Earth is subject to gravitational wave emission as well, but the orbital decay is so small that it in practice won't affect earth within the Suns lifetime, instead of Earth spiralling into and being devoured by our Sun, it will rather be our Sun (turning into a red giant) which extends beyond the current orbit of Earth and thus devours it.
So even by cosmological timescales, planetary motion around a star will go on for a long time, e.g for the lifetime of a sun-like star and beyond.