  Cooling of neutron stars (NSs) with the cores composed of neutrons, protons,
and electrons is analyzed. The main cooling regulators are discussed: opening
of direct Urca process in a NS central kernel; superfluidity of nucleons in NS
interiors; surface layers of light (accreted) elements; strong surface magnetic
fields. An emphasis is paid on the cooling scenario with strong $^1$S$_0$
pairing of protons and weak $^3$P$_2$ pairing of neutrons in the NS core, as
well as strong $^1$S$_0$ pairing of neutrons in the NS crust. The theory
predicts three types of isolated cooling middle-aged NSs with distinctly
different properties: low-mass, slowly cooling NSs; medium-mass, moderately
cooling NSs; massive, rapidly cooling NSs. The theory is compared with
observations of isolated NSs -- pulsars and radio quiet NSs in supernova
remnants. The constraints on physical properties of NSs which can be inferred
from such a comparison are outlined.
