why does a magnet fix itself to a ferromagnetic material?
the magnetic field of the bar magnet makes the magnetic moments in the metal align, building up a finite magnetization vector - equivalent to an induced closed current ring at the surface
a force is acting on the magnet though the magnet's surface current and the induced magnetic field at that location
the force has a component that is vertical pointing towards the material
the strength of the induced field and vertical force depends on the value of , and whether the force is strong enough to oppose gravity