Magnetism is the phenomenon associated with the motion of electric charges, although the study of magnets was very confused before the 19th century because of the existence of ferromagnets, substances such as iron bar magnets which maintain a magnetic field where no obvious electric current is present (see below). Basic magnetism is the existence of magnetic fields which deflect moving charges or other magnets. Similar to electric force in strength and direction, magnetic objects are said to have ‘poles’ (north and south, instead of positive and negative charge). However, magnetic objects are always found in pairs, there does not exist isolated poles in Nature. The most common source of a magnetic field is an electric current loop. The motion of electric charges in a pattern produces a magnetic field and its associated magnetic force. Similarly, spinning objects, like the Earth, produce magnetic fields, sufficient to deflect compass needles.
Today we know that permanent magnets are due to dipole charges inside the magnet at the atomic level. A dipole charge occurs from the spin of the electron around the nucleus of the atom. Materials (such as metals) which have incomplete electron shells will have a net magnetic moment. If the material has a highly ordered crystalline pattern (such as iron or nickel), then the local magnetic fields of the atoms become coupled and the material displays a large scale bar magnet behaviour.