How a magnet attracts iron ? And it doesn't attract insulator. Why?

Magnetic field is always produced by moving charges.
The movement of electrons around the atom generates an electric current and causes each electron to act like a microscopic magnet.
In many substances, equal numbers of electrons spin in opposite directions, which cancels out their magnetism. So they are not influenced by magnetic field.
In substances like Iron there are unpaired electrons which allow them to become magnetised.
Magnets attract iron due to the influence of their magnetic field upon the iron. Before a piece of iron first enters the magnetic field of a magnet, the motion of the iron's electrons is random. 

As it is exposed to the magnetic field, the atoms of the iron begin to align their electrons with the direction of the magnetic field, which makes the iron magnetized as well.
This, in turn, creates an attraction between the two magnetized objects.

Simply Easy Learning