Ferromagnetism for 3d, 4f metals

Why Fe, Co and Ni are ferromagnetic? what aspects of their electronic structure favors ferromagnetism? How 3d or 4f metals can be ferromagnetic and what is their origin of
ferromagnetism?