A compass needle is made of magnetized material and points toward Earth's north magnetic pole no matter which direction the compass faces. Therefore, it is an excellent low-tech tool with which to find direction. Earth has a powerful magnetic field that emanates from the axis of rotation. Magnets are created from materials whose electrons all point the same direction and are attracted to an opposite charge.
The Earth's magnetic field is thought to be generated mostly by the rotation of the liquid iron outer core around the solid iron inner core that produces the so-called "dynamo effect." Any magnetic material that rotates fast enough for its size begins producing an electric current. Because electricity and magnetism are linked, the current then produces a rotating field. Also, friction pulls electrons free and enables them to flow in a rotating current.
The magnetic field surrounding the Earth is tilted approximately 11 degrees from the rotational axis, so a compass cannot always reliably point true north. In addition, the field reverses polarity periodically. One popular theory stated that the magnetic poles were due to shift in 2012, causing mass havoc with electronics, communications and other technological devices. This phenomenon, however, did not occur.