Magnetism is similar to electricity (not surprisingly, since they are closely related, as we will see later). Instead of positives and negatives, we have north poles and south poles. There is no such thing as a magnet with a single pole—there is always a north pole and a south pole.
We explain the behaviour of magnets using domain theory. Magnetic materials are composed of many domains, which are clusters of atoms with a magnetic dipole. There are only a few ferromagnetic materials, the most common ones being iron, nickel and cobalt. Most iron on the Earth isn’t magnetized, but it still has domains. The domains are all pointing in random directions, so they cancel each other out. In a magnet, the domains are all aligned—they point in the same direction:
When iron comes in contact with a magnet, it becomes a temporary magnet. To make a permanent magnet, you have to melt the iron (actually, steel is more commonly used) and then let it cool in the presence of a strong magnetic field. When a magnet is saturated, it is at its maximum strength—no more domains can be aligned.
The diagrams for magnetic fields are very similar to those for electric fields. The field lines go from north to south instead of positive to negative. With a horseshoe magnet, part of the field is linear.