Sources of magnetic fields