Magnetism
A very common source of magnetic field found in nature is a dipole, with a "South pole" and a "North pole", terms dating back to the use of magnets as compasses, interacting with the Earth's magnetic field to indicate North and South on the globe. Since opposite ends of magnets are attracted, the north pole of a magnet is attracted to the south pole of another magnet. The Earth's North Magnetic Pole (currently in the Arctic Ocean, north of Canada) is physically a south pole, as it attracts the north pole of a compass.
A magnetic field contains energy, and physical systems move toward configurations with lower energy. When diamagnetic material is placed in a magnetic field, a "magnetic dipole" tends to align itself in opposed polarity to that field, thereby lowering the net field strength. When ferromagnetic material is placed within a magnetic field, the magnetic dipoles align to the applied field, thus expanding the domain walls of the magnetic domains.
Earth's magnetic field
The Earth and most of the planets in the Solar System, as well as the Sun and other stars, all generate magnetic fields through the motion of electrically conducting fluids. The Earth's field originates in its core. This is a region of iron alloys extending to about 3400 km (the radius of the Earth is 6370 km). It is divided into a solid inner core, with a radius of 1220 km, and a liquid outer core. The motion of the liquid in the outer core is driven by heat flow from the inner core, which is about , to the core-mantle boundary, which is about . The heat is generated by potential energy released by heavier materials sinking toward the core (planetary differentiation, the iron catastrophe) as well as decay of radioactive elements in the interior. The pattern of flow is organized by the rotation of the Earth and the presence of the solid inner core.