Why does magnet attract iron?

In atoms, the electrons and the nucleus are always in a rotational movement called spin. If they rotate in different directions, one movement offsets the other and there is no magnetism. This is what happens in most materials. In magnets, however, both spin in the same direction and this is what causes a strong magnetic field. Iron has the same tendency for atoms closest to each other to spin in the same direction, also creating tiny magnetic fields. If it is close to a magnet, the rotational movements of these atoms start to be directed towards the magnet (due to its magnetic field) – and, in this way, the iron is attracted. The most curious thing is that, if the magnetic field of the magnet is quite intense, the orientation of the iron atoms will remain ordered even after the magnet is removed. Thus, the iron itself has a magnetic field capable of attracting other ferrous objects.

Normally, the magnetic fields of iron are arranged in small regions. When close to a magnet, they all point in the same direction.