Cause of ferromagnetism
The phenomenon of ferromagnetism arises due to both the interaction between the neighbouring atomic dipoles and the alignment of the permanent dipoles in atoms that result from unpaired electrons in the outer shells. The ferromagnetic materials such as iron, cobalt have a specific electronic structure such that their outermost shell contains electrons even though the inner shell next to the outermost is still unfilled. Due to this electronic structure the spin magnetic moments of ferromagnetic materials become drastically large, resulting large atomic dipole moments.
Reference: This aarticle is is referred from my authored “electrical engineering materials” having ISBN 978-81-272-5069-0