Without looking anything up, I believe that waterskier has the right idea. The basic idea is that every molecule in the metal has its own, small magnetic field. If the molecules are all scrambled in different directions, there is no “net” magnetic field, because they cancel each other out. If the molecules all point in the same direction, the magnetic field has an additive effect, making a magnet!
“Heat” is essentially a measurement of how much motion the molecules of a material have. The more motion, the more heat. By heating up a magnet, you are forcing the molecules to move around faster, and when they finally “settle down” again (they are still moving, but not as much), there’s no reason why they would all line up in the same direction. Hence, no more magnet.
it’s finals week and i’m not getting much sleep. sorry if this is incoherent