  We survey the current status of understanding of pairing and superfluidity of
neutrons and protons in neutron stars from a theoretical perspective, with
emphasis on basic physical properties. During the past two decades, the
blossoming of the field of ultracold atomic gases and the development of
quantum Monte Carlo methods for solving the many-body problem have been two
important sources of inspiration, and we shall describe how these have given
insight into neutron pairing gaps. The equilibrium properties and collective
oscillations of the inner crust of neutron stars, where neutrons paired in a
$^1$S$_0$ state coexist with a lattice of neutron-rich nuclei, are also
described. While pairing gaps are well understood at densities less than one
tenth of the nuclear saturation density, significant uncertainties exist at
higher densities due to the complicated nature of nucleon-nucleon interactions,
the difficulty of solving the many-body problem under these conditions, and the
increasing importance of many-nucleon interactions. We also touch more briefly
on the subject of pairing of neutrons in other angular momentum states,
specifically the $^3$P$_2$ state, as well as pairing of protons.
