On the difference between electromagnets and permanent magnets I've been reading about the difference between electromagnets and permanent magnets and I have a question about the difference between them. If permanent magnets get their magnetic field from the spin of their constituent electrons, isn't this spin still present in the case of electromagnets, since electrons everywhere have their own spin? So, does the difference then lie in the type of material being used, whether its hard or soft metal? Otherwise, electrons exist in both of them so we have electron spin in both cases. What I mean is that it's not reasonable to differentiate between them by the electron spin since both have it.
 A: In a permanent magnet it is the electron spin that is responsible for magnetism. A simple explanation is that all of the spins are aligned. Going beyond this simple explanation requires at least some understanding of quantum mechanics; understanding permanent magnets in detail requires a deep understanding of quantum mechanics as well as an understanding of condensed matter physics and many body physics.
In an electromagnet the magnetic field is generated by moving electric charges. You can understand electromagnets using only Maxwell equations. There is no need to reference quantum mechanics to understand electromagnets. In contrast to permanent magnets the electron spins are not all aligned and the electron spin does not play an important role in magnetism. It is electron charge that is essential.
A: In a permanent magnet the nature of the material is such that the electron spins are 'sticky' in their direction, if one applies a strong enough external magnetic field the 'stickiness' will be overcome and they will align with that field. Similarly, if you get a magnet hot enough, this will also tend to destroy the alignment.
In contrast, in a conductive material, the spin alignment tends not to be sticky at all, and the spins take a random alignment relative to each other resulting in a net magnetic field of zero.
Of course, this is a simplified explanation, but I think gets to the core of your question.
