MAGNETS
A permanent bar magnet creates a magnetic field that closely resembles the
magnetic field produced by a circular loop of current-carrying wire:
By convention, the magnetic field lines emanate from the end of the magnet
designated the north pole (N) and then curl around and re-enter the magnet at the
end designated the south pole (S). The magnetic field created by a permanent bar
magnet is due to the electrons, which have an intrinsic spin as they orbit the nuclei.
They are literally charges in motion, which is the ultimate source of any and all
magnetic fields. If a piece of iron is placed in an external magnetic field (for
example, one created by a current-carrying solenoid), the individual magnetic
dipole moments of the electrons will be forced to more or less line up. Because
iron is ferromagnetic, these now-aligned magnetic dipole moments tend to retain
this configuration, thus permanently magnetizing the bar and causing it to produce
its own magnetic field.
As with electric charges, like magnetic poles repel each other, while opposite