system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Where do magnets get the energy to do magnet things.

I have a reasonable understanding of why magnets are magnetic and how the poles exist. I also understand (on a basic level) that electricity and magnetism are the same thing. However, I don't understand where the energy comes from to spontaneously move objects across a distance. Why can a magnet lift a paperclip off a desk? Where does the energy to lift the clip come from?

Edit: Wow! Thanks everyone. I feel like I'm learning so much. Magnets are wild.
gpt
Physics is weird. One of the things they teach you is that an object sitting on a table is applying force to the table, and the table is applying an equal force to the object, just in the opposite direction. This does not require any energy input. No work is being done.

Magnets are similar. They apply a force on each other that is similar to the force of gravity, only with a different type of field (2 poles). They'll seek the lowest energy state, which is where the opposite poles are together. It requires energy to pull them apart, just like it requires energy to lift the object off the table.