Any object that is made up of iron interacts or attracts the magnet due to the magnetic field of the iron. The polarization of the iron's atom is random before it penetrates the magnetic field of the magnets that is why the the atoms fall the electrons into a line with the use of the magnetic field magnetizing the iron too. This process results to the attraction of both iron and magnet making an iron magnetized as it will be exposed with a metal.