Lucas – your question has stimulated quite a bit of chatter among the scientists on the back-channels (e.g. twitter).
I’ve been digging a bit and – to my relief – nothing that I said at first is wrong – phew! Magnetic forces arise due to the relative movement of charged particles (e.g. electrons, protons). If you will accept that like charges repel and opposite charges attract (due to the electrostatic force which we don’t really understand – we just know that it’s there) we can start from there.
When charges are moving relative to one another then Einstein’s theory of relativity comes into play – this tells us that when we (or an electron) observe a moving object it actually appears slightly shorter that it does when it’s not moving (weird but true!). The changes are tiny unless the speeds involved are very large but they are significant. This means that the charge density (charge per unit length) in the moving object increases slightly and that gives rise to an extra bit of electrostatic force. We we would see this for example in an electron that was moving parallel to a wire in which there was an electric current – it would be attracted to the wire by what we would call a magnetic force (if the electron was not moving or there was no current in the wire, there would be no force between them).
(So electrostatic and magnetic forces are, in a way, two sides of the same coin. That’s why we often talk about electromagnetism – the two phenomena are not easily separated!)
Now – to jump to magnetic materials. The structure of many atoms results in orbitals containing unpaired electrons that (to a first approximation) are whizzing around the nucleus, giving rise to a tiny current. So once again you have moving charges. These will interact with other moving charges (in other magnets) in the same way as my electron plus wire example above.
OK all that may seem very complicated – you can probably see that I still don’t fully understand it myself but then not many people do. But your question was still a great one and has reminded me of why I loved physics so much – it really tries to dig into the heart of things.
Tom is spot on about the idea that electomagnetic forces are thought to arise from particles swapping photons back and forth. But of course that just raises other questions: why do they swap photons? how do they know which direction to throw them in?
It’s a pretty mysterious place this universe, innit?