The atoms in magnetic material, such as iron are arranged in Domains.
Domains are groups of atoms which are aligned in the same direction and therefore the electrons in all of the atoms contribute to the field.
Unmagnetised nail in which the domains have random orientation
Magnetised nail in which the domains are aligned
The classic method of revealing the shape of a magnetic field is to use iron filing on a sheet of paper near the magnet. On a simple bar magnet the shape is like this:
The strength of the field between the poles of a U shaped magnet is much stronger because the air gap is smaller. The iron or metal alloy of the metal has a high permeability whereas that of the air is very low.
The definition of a magnetic field is that it is the space around a magnetic which exerts a force on a moving electric charge. The field is a vector, it has size or strength and direction.
An electric current flowing through a wire produces a magnetic field around it. The field around a single wire is generally very small. The strength depends on the size of the current and the distance from the wire. In reality, unless the current is very large it is hard to see the field using iron filings, but can easily be detected with a magnetic compass. The field is circular and clockwise, looking in the direction of conventional current flow.
However a strong magnetic field can be made if we use a coil of wire and stronger still if we wrap the wire around a piece of iron like a nail.
The combined fields around each coil produce a very strong field in the centre of the coil. If a highly permeable iron nail is placed in the centre of the coil the air path of the field lines is shorter and the field is stronger.
Other useful pages on magnetism and electromagnetism are: