Permanent magnets are often made of Al, Ni and Co atoms. These atoms have their own magnetic fields but they start out pointing in all different directions so that the sum of their fields is zero.
A new magnet must be immersed in the field created by another magnet (while it is heated). Its atoms then move so that all their fields point in the same direction (opposite to that of the other magnet). When they cool, they lock into position giving the new magnet a permanent field. This field is generally shown as a bunch of lines looping from one end of the magnet to the other.