A magnet is by definition an object with magnetic properties (
magnetism) that attracts iron and produces a
magnetic field. It can be a
permanent magnet or an
electromagnet.
Permanent magnets do not rely upon outside influences to generate their field. In permanent magnets are the atoms and molecules ordered in long range. The specific electron configuration and the distance of the atoms is what lead to this long range ordering. The electrons exist in a lower
energy state if they all have the same
orientation. Magnetic domains can be likened to microscopic neighborhoods in which there is a strong reinforcing interaction between particles, resulting in a high degree of order. The greater the degree of ordering within and between domains, the greater the resulting field will be. Long range ordering is one of the hallmarks of a
ferromagnetic material.
A current carrying
conductor for example a piece of wire, produces a
magnetic field that encircles the wire. An
electromagnet, in its simplest form, is a wire that has been coiled into one or more loops. This
coil is known as a
solenoid. The more loops of wire and the greater the current, the stronger the field will be.
Superconducting magnets are a special type of electromagnets, often used in
MRI machines with high
field strength.