Context : The standard cooling models of neutron stars predict temperatures of T < 10 ^ { 4 } K for ages t > 10 ^ { 7 } yr . However , the likely thermal emission detected from the millisecond pulsar J0437-4715 , of spin-down age t _ { s } \sim 7 \times 10 ^ { 9 } yr , implies a temperature T \sim 10 ^ { 5 } K. Thus , a heating mechanism needs to be added to the cooling models in order to obtain agreement between theory and observation . Aims : Several internal heating mechanisms could be operating in neutron stars , such as magnetic field decay , dark matter accretion , crust cracking , superfluid vortex creep , and non-equilibrium reactions ( “ rotochemical heating ” ) . We study these mechanisms to establish which could be the dominant source of thermal emission from old pulsars . Methods : We show by simple estimates that magnetic field decay , dark matter accretion , and crust cracking are unlikely to have a significant heating effect on old neutron stars . The thermal evolution for the other mechanisms is computed with the code of Fernández and Reisenegger . Given the dependence of the heating mechanisms on the spin-down parameters , we study the thermal evolution for two types of pulsars : young , slowly rotating “ classical ” pulsars and old , fast rotating millisecond pulsars . Results : We find that magnetic field decay , dark matter accretion , and crust cracking do not produce any detectable heating of old pulsars . Rotochemical heating and vortex creep can be important both for classical pulsars and millisecond pulsars . More restrictive upper limits on the surface temperatures of classical pulsars could rule out vortex creep as the main source of thermal emission . Rotochemical heating in classical pulsars is driven by the chemical imbalance built up during their early spin-down , and is therefore strongly sensitive to their initial rotation period . Conclusions :