  The CARMENES instrument was conceived to deliver high-accuracy radial
velocity (RV) measurements with long-term stability to search for temperate
rocky planets around a sample of nearby cool stars. The broad wavelength
coverage was designed to provide a range of stellar activity indicators to
assess the nature of potential RV signals and to provide valuable spectral
information to help characterise the stellar targets. The CARMENES Data Release
1 (DR1) makes public all observations obtained during the CARMENES guaranteed
time observations, which ran from 2016 to 2020 and collected 19,633 spectra for
a sample of 362 targets. The CARMENES survey target selection was aimed at
minimising biases, and about 70% of all known M dwarfs within 10 pc and
accessible from Calar Alto were included. The data were pipeline-processed, and
high-level data products, including 18,642 precise RVs for 345 targets, were
derived. Time series data of spectroscopic activity indicators were also
obtained. We discuss the characteristics of the CARMENES data, the statistical
properties of the stellar sample, and the spectroscopic measurements. We show
examples of the use of CARMENES data and provide a contextual view of the
exoplanet population revealed by the survey, including 33 new planets, 17
re-analysed planets, and 26 confirmed planets from transiting candidate
follow-up. A subsample of 238 targets was used to derive updated planet
occurrence rates, yielding an overall average of 1.44+/-0.20 planets with 1
M_Earth < M sin i < 1000 M_Earth and 1 d < P_orb < 1000 d per star, and
indicating that nearly every M dwarf hosts at least one planet. CARMENES data
have proven very useful for identifying and measuring planetary companions as
well as for additional applications, such as the determination of stellar
properties, the characterisation of stellar activity, and the study of
exoplanet atmospheres.
