  The past years have witnessed tremendous progress in understanding the
properties of neutron stars and of the dense matter in their cores, made
possible by electromagnetic observations of neutron stars and the detection of
gravitational waves from their mergers. These observations provided novel
constraints on neutron-star structure, that is intimately related to the
properties of dense neutron-rich matter described by the nuclear equation of
state. Nevertheless, constraining the equation of state over the wide range of
densities probed by astrophysical observations is still challenging, as the
physics involved is very broad and the system spans many orders of magnitude in
densities. Here, we review theoretical approaches to calculate and model the
neutron-star equation of state in various regimes of densities, and discuss the
related consequent properties of neutron stars. We describe how the equation of
state can be calculated from nuclear interactions that are constrained and
benchmarked by nuclear experiments. We review neutron-star observations, with
particular emphasis on information provided by gravitational-wave signals and
electromagnetic observations. Finally, we discuss future challenges and
opportunities in the field.
