Calorimetry at the High-Luminosity LHC (HL-LHC) faces many challenges, particularly in the forward direction, such as radiation tolerance and large in-time event pileup. To meet these challenges, the CMS Collaboration is preparing to replace its current endcap calorimeters for the HL-LHC era with a High-Granularity Calorimeter (HGCAL), featuring an unprecedented transverse and longitudinal segmentation, for both the electromagnetic and hadronic sectors, with 5D information (space-time-energy) read out. The proposed design uses silicon sensors for the electromagnetic section and high-irradiation regions of the hadronic section, while in the low-irradiation regions of the hadronic section plastic scintillator tiles equipped with on-tile silicon photomultipliers (SiPMs) are used. The full HGCAL will have approximately 6 million silicon sensor channels and about 240 thousand channels of scintillator tiles. This will facilitate particle-flow-type calorimetry, where the fine structure of showers can be measured and used to enhance particle identification, energy resolution and pileup rejection.