The CMS Collaboration has conducted extensive studies of heavy ion (HI) physics at the Large Hadron Collider (LHC), focusing on the quark-gluon plasma (QGP) formed in high-energy nucleus-nucleus collisions. The collaboration has measured a broad range of observables related to high-density quantum chromodynamics (QCD), precision quantum electrodynamics (QED), and beyond-standard-model (BSM) phenomena. Key advances have been made in understanding the macroscopic and microscopic properties of the QGP, particularly at the highest temperatures and with vanishingly small baryon chemical potentials. This article summarizes the results from the CMS HI program during LHC Runs 1 (2010-2013) and 2 (2015-2018), covering the partonic content of nuclei, properties of the QGP, and surprising QGP-like effects in smaller collision systems. It also outlines the scientific potential of using ultrarelativistic HI collisions to characterize the QGP with unprecedented precision and to explore novel fundamental physics phenomena. The CMS detector's capabilities, including its broad acceptance, high resolution, and calorimetry, are highlighted, along with the challenges and techniques used for event selection and reconstruction in HI collisions. The article concludes with a discussion of future directions for CMS in high-density QCD studies.The CMS Collaboration has conducted extensive studies of heavy ion (HI) physics at the Large Hadron Collider (LHC), focusing on the quark-gluon plasma (QGP) formed in high-energy nucleus-nucleus collisions. The collaboration has measured a broad range of observables related to high-density quantum chromodynamics (QCD), precision quantum electrodynamics (QED), and beyond-standard-model (BSM) phenomena. Key advances have been made in understanding the macroscopic and microscopic properties of the QGP, particularly at the highest temperatures and with vanishingly small baryon chemical potentials. This article summarizes the results from the CMS HI program during LHC Runs 1 (2010-2013) and 2 (2015-2018), covering the partonic content of nuclei, properties of the QGP, and surprising QGP-like effects in smaller collision systems. It also outlines the scientific potential of using ultrarelativistic HI collisions to characterize the QGP with unprecedented precision and to explore novel fundamental physics phenomena. The CMS detector's capabilities, including its broad acceptance, high resolution, and calorimetry, are highlighted, along with the challenges and techniques used for event selection and reconstruction in HI collisions. The article concludes with a discussion of future directions for CMS in high-density QCD studies.