If the atoms in a magnet or other object are arranged with their poles helter-skelter, then the attraction or repulsion of a north pole is cancelled by the opposite force of a nearby south pole. When this occurs, magnetic force is not noticed outside the object. However, if most of the atoms have their poles lined up, then the attraction or repulsion of all the north poles at one end are not cancelled out and the magnetic force is noticed. At the other end of the magnet, the forces exerted by the south poles of the atoms build up into the strong force of a south pole. The center of a magnet is weak because the force of every north pole is cancelled by the force of a nearby south pole.
Materials differ in the ease with which their atoms can be lined up.
In non- magnetic materials, the atoms don't turn around and line up very easily. The magnetic field surrounding a strong magnet can temporarily magnetize objects made of iron, steel, nickel, or cobalt. When an iron nail is brought near the north pole of a magnet, the south poles of the atoms are pulled around to line up facing the north poles. The particles of a nail are lined up in one direction and the whole nail becomes a temporary magnet. But if the nail is taken away from the magnet, the particles revert back to their random distribution and the nail's magnetism disappears.