We propose a general method to self-consistently study the quasistationary evolution of the magnetic field in the cores of neutron stars. The traditional approach to this problem is critically revised. Our results are illustrated by calculation of the typical timescales for the magnetic field dissipation as functions of temperature and the magnetic field strength.