Atom
To understand how magnets work, we can look at the properties of the atom. Any magnet has a north and south pole, and a certain strength. The direction and strength of a magnet, together, are called its magnetic moment. Every electron also has a magnetic moment, like a tiny magnet. This comes from the electron's spin and its orbit around the nucleus. The magnetic moments for the electrons add up to a magnetic moment for the whole atom. This tells us how atoms act in a magnetic field.