system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Why do magnets damage electronics?

How do magnets damage electronics on a small scale? For instance, how does a magnet damage the data on a hard disk drive?

And, on a bigger scale, how do EMPs (electromagnetic pulses) cause mass absolute destruction to all electronics in the vicinity of the EMP detonation?
gpt
Most electronics will not be damaged by a magnet. The things that do get damaged by magnets get messed up because they use magnets to work- hard drives store data by magnetizing tiny portions of the disk, and then a magnetic needle "reads" which way each section of the disk pulls. Other electronics, like flash memory or a CPU, won't get damaged by a magnet.

Now an EMP is another issue. Electricity and magnetism are related, and a change in magnetic field near a loop of wire will create a current. When you have a gigantic sudden change in the magnetic field, it can create a current so high that the electronics heat up really quickly and things start to melt. However, the only thing we have that's capable of creating a big enough magnetic pulse to do this is a nuclear weapon which will also damage electronics in other ways. We don't have movie mad-scientist supervillian "I will blast the city back to the stone age mwahaha" EMPs.