An appropriate explanation might begin by explaining that the cosmic microwave background (CMB) was formed in the expanding universe about 400,000 years after the big bang. An expanding gas cools, and when the gas in the universe cooled to about 3000 K, a transition tok place whereby the protons and electrons, hitherto free particles, combined to form hydrogen atoms. These atoms were almost transparent to the hot radiation field and allowed it to escape, free to travel the universe until we detect it 13.6 billion years later. In the meantime, the cosmic expansion has stretched the wavelength of the radiation from the optical/infrared to the microwaves we see now as the CMB.
At the time when the radiation was "released" there would have been instabilities in the gas - regions of slightly higher or lower density (compressions and rarefactions). For a number of reasons, these will leave a small imprint in the radiation field at that time, which is now observed in the form of tiny temperature variations in the CMB at different positions in the sky.
The "spectrum" of the temperature variations (basically, by how much the temperature varies as a function of angular separation on the sky) depends primarily on two things. (a) The scale of the compressions and rarefactions in the universe when the radiation was formed and (b) by how much and in what way the universe has expanded since then.
Factor (a) is directly dependent on how dense the universe was when the CMB was formed, which depends on how dense the universe is now and a cosmological model of how the universe has expanded. (b) Also depends on the rate of expansion, which can be expressed in terms of the Hubble constant, but also depends on the topology of the universe - whether it is "flat" or "curved", since this can magnify or diminish the apparent size of the fluctuations.
In the end then, the appearance of the CMB now is dependent on both its formation conditions, the history of the universal expansion and the geometry of the universe. Each of these can be parameterised using standard cosmological models that include the current density parameter and Hubble parameter. These are related to conditions at any previous epoch in much the same way that the position and speed of a projectile can be used to predict is position and speed at any point in the past (or future).