Why Are Magnets Magnetic?
To get right to the point, we don't know the exact reasons. We do know at least a few things though. Let's take a look...
1) Electrons Are Magnetic
Each individual electron is a magnet with north and south poles, just like a regular magnet you'd stick on the fridge.
Why are electrons magnetic? Here's the quick, honest answer:
We don't know.
If you'd prefer a more complex, scientific sounding answer, buckle up. But be warned, we're just going to end up in the same place we started. I'd really recommend just skipping to Section 2, but if you insist, here goes:
Quantum mechanics asserts that electrons have something called a "spin." This would make perfect sense. It would mean that electrons behave like our planet, because Earth spins on an axis, has a magnetic field, and orbits around the sun. Electrons spin on an axis, have a magnetic field, and orbit around a nucleus. It's like a tiny solar system. It makes so much sense now.
Unfortunately, quantum physicists insist that electrons aren't actually spinning like the earth. Now we have to just toss out the planet analogy.
Why don't they think the electron is spinning? Because, using mathematical equations they've made, and making some assumptions about an electron—which no one has ever seen—the math doesn't seem to add up.
Apparently, if an electron were to spin, according to their calculations it would have to be spinning faster than the speed of light. Because of the Theory of Relativity, most scientists agree that you can't do that. The speed of light is apparently nature's speed limit.
So, what exactly does "spin" mean to the quantum mechanics crowd? It's not totally certain. They know it exists, but can't exactly agree on what it is. In other words, we just took the long route to the same answer: We don't know.
Remember, we didn't create science; we only discover it.
2) Atoms Can Be Magnetic Because of Electrons
Any charged particle can be magnetic. That means that both electrons and protons are magnetic. However, we don't really worry about the magnetism of protons because their magnetic force is so weak compared to the electrons. As a result, an atom's magnetism is determined by its electrons.
In an atom, there can be multiple electrons, each with their own magnetic force. However, because they aren't always "spinning" the same way, their magnetic forces are pointing different directions. The result is that their magnetic pulls cancel each other out. When many of them point the same direction, you get a strong magnetic force.
Two examples of electron configurations:
Non-Magnetic - If you have 2 electrons whose north poles are pointing up, and 2 electrons pointing down, their forces will cancel out. That atom would not be magnetic. (It would be like a car's front tires spinning forward, while the rear tires spin in reverse. They would cancel each other out.)
Magnetic - If there is 1 electron pointing up, and 2 pointing down, the material will be magnetic, because there are more pointing in one direction than the other. (The electron that's facing up will cancel out the first electron that's pointing down. That leaves one extra electron. That electron will make the atom magnetic.)
3) Materials Can Be Magnetic Because of Atoms
Now that you have some magnetic atoms, you can put them together to make a big magnet. However, the atoms must be aligned the same direction first.
Take iron, for example. If the atoms are arranged chaotically, their magnetic forces will point all over the place and you won't get a great magnet. You must first align the magnetic atoms (aka "magnetic domains") to get a powerful magnet. This can be done by putting the iron in a strong magnetic field.
A common method for aligning magnetic domains is to make an electromagnet. This can be done by wrapping a copper wire around an iron bar, and then running electricity through the wire. When the electrons move through the wire, they will create a strong magnetic force inside the iron. (Why? We don't know why, but wherever there is moving electricity, there is magnetism.) This magnetic force will stop when the electricity is turned off, but if you expose the iron to that magnetism long enough, it will eventually align the atoms and the iron will become a magnet.
Bonus Tip: The next time someone tells you "the science is settled," ask them how a magnet works.