Isolated neutron stars show a diversity in timing and spectral properties, which has historically led to a classification in different sub-classes. The magnetic field plays a key role in many aspects of the neutron star phenomenology: it regulates the braking torque responsible for their timing properties and, for magnetars, it provides the energy budget for the outburst activity and high quiescent luminosities (usually well above the rotational energy budget). We aim at unifying this observational variety by linking the results of the state-of-the-art 2D magneto-thermal simulations with observational data. The comparison between theory and observations allows to place two strong constraints on the physical properties of the inner crust. First, strong electrical currents must circulate in the crust, rather than in the star core. Second, the innermost part of the crust must be highly resistive, which is in principle in agreement with the presence of a novel phase of matter so-called nuclear pasta phase.