In some elements such as iron, cobalt, and nickel, the atoms emit tiny magnetic fields. Initially, these materials are not magnetic because the tiny magnetic fields are arranged randomly, canceling each other out. But when placed within magnetic lines of flux, the atoms can be arranged so that their magnetic fields align.
The movement of molten metals in Earth's core as it rotates generates a magnetic field. The atoms of a magnetic substance can be aligned by the magnetic field surrounding the Earth. When rocks containing magnetic substances are held in position in the magnetic lines of force of the Earth, over time, these rocks atoms magnetic fields become aligned with Earth's magnetic field, thus creating a natural magnet.
Whenever an electric current flows it is accompanied by a magnetic field. In a straight wire, magnetic lines of flux surround the wire in circles. If the wire is bent into a loop, the magnetic field will be concentrated.
If the loops are stacked into a coil, the magnetic field will be increased. If a bar of unmagnetized material, such as iron, is held in the magnetic field of a coil, the materials atoms magnetic fields will align, and it will become a magnet.
When the electric current through the coil is turned off, the magnetic field around the coil will collapse. However, because the atoms in the bar of iron can't unalign themselves so easily, the bar of iron retains its magnetic field and becomes a permanent magnet.
Placing a core of special magnetic material inside the coil will increase the intensity of the magnetic field. Usually the material of the core material will be designed to increase the strength of the magnetic field while current is flowing in the coil, but will not become permanently magnetized after the electric current through the coil is turned off. This allows the coil to be used as a solinoid.
Magnetic Units
The amount of magnetic flux, or the flux density, of a magnetic field in measured in a unit called a Weber (Wb). For weaker magnetic fields, a smaller unit, called the Maxwell used. One Maxwell is equal to 0.00000001 of a Weber.
The greater the electric current through a wire, the greater will be the flux density around the wire. A wire formed into a loop will produce a greater flux density than a straight wire. The more turns in the coil, the stronger will be the magnetic field.
The strength of a magnetic field may also be specified in ampere-turns (At). Ampere-turns is a unit of Magnetomotive Force (MMF). One At is produced by a one-turn wire loop, carrying 1 A of current. Doubling the number of turns, or the doubling the current, will double the ampere-turns. Another unit of magnetomotive force is the Gilbert. One Gilbert equal to 0.796 At.