This will be a pretty hand-waving type of explanation (I mean, I totally ignore dark matter!), but hopefully it gives you a not-entirely-wrong analogy that you can use to create a rough picture in your head of what is going on.
So "since the beginning" the universe has had regions of over densities and regions of under densities. Prior to recombination (at around 400kY after the big bang) the photons and baryons were coupled into a single fluid (since the universe was super hot and everything was just one big plasma soup). Gravity acted on the baryons, pulling them in towards over densities, making those regions even denser. Photon radiation pressure counteracted this pull, and pushed the fluid back out, making the regions less dense. This created conditions for oscillation of the photon-baryon fluid. These oscillations were effectively sound waves (i.e. pressure waves). The maximum wavelength of these pressure waves at any given point in time was set by the distance a photon could have travelled since the big bang (as that effectively sets the maximum distance of causal connection). There was no theoretical minimum wavelength (maybe the size of the biggest baryon?), but practical considerations impose a cutoff which I'll discuss later.
If you think of the universe as an open pipe, with a length set by the horizon (i.e. how far a photon has had time to travel up till that point in history), then, as the length of that pipe grows with time (the universe is expanding, and cooling), the fundamental mode in the pipe (i.e. the wavelength that can fit one half wavelength into the universe-pipe) will be the wavelength corresponding to one full compression (i.e. gravity, operating at light speed, has just had time to pull matter in, but the photon pressure hasn't had time to push it back out yet). The second harmonic will be one full wavelength (i.e. gravity had time to pull matter in, the photon pressure pushed it out, and there hasn't been time enough for anything else yet). Of course, every wavelength shorter than the fundamental will exist, but at any given snapshot in time, only the integer multiples of the fundamental (which is a function of time itself) will constructively interfere to dominate the distribution of clumpiness of matter at that moment. All the rest will destructively interfere and average out to zero.
So now let's fast forward to recombination. The wavelength of the fundamental frequency (i.e. the length of our universe pipe) has been growing with time since every day the length a photon has had time to travel grows. At the same time, space is expanding (which has complicated effects on the actual size of the universe pipe, which we are completely ignoring) and cooling everything off. Eventually the universe cools enough for recombination. All the electrons and protons get together, and the photons no longer have anything to interact with (because of that giant 13.6 eV energy gap in Hydrogen) so they all just zip off in whatever direction they were going. This breaks the oscillator. Without the photon pressure to counteract the gravity, the oscillations stop. The baryons and dark matter are now free to succumb to gravity, and the current universe results. The photons, which are now free-streaming, carry with them a distribution that exactly mirrors the state of the universe at recombination. This means that the photons will contain a picture of a universe (which is a pipe, remember?!) that has a specific fundamental frequency (that depends on time). Since the fundamental tone (and all its integer multiples) define the clumpiness, a power spectrum made of the CMB will have a peak at each length scale that fits neatly into the pipe, so there will be one for the first compression mode, one for the first rarification mode, etc. (a power spectrum is effectively the square of the Fourier transform, so both peaks and troughs in the Fourier transform show up as peaks in the power spectrum).
The power spectrum of the CMB should have an infinite number of peaks (for the infinite number of ever-shorter wavelengths that could perfectly fit into the universe pipe at recombination), but two things tend to damp out the small scale fluctuations. The first is that the last scattering surface (i.e. the CMB) is actually a shell. Recombination happened over a number of years, and so the thickness of that shell sets the minimum wavelength that we can see in the CMB today, as correlation information was lost as photons had to random walk out of that shell to freedom and they tended to walk from hot areas to cool areas because of diffusion). The second is basically every other thing (i.e. gravity) that effects photons on their 13 billion year journey to our telescopes.
Finally, we fast forward to almost now, and look around at the structure of the universe, and try to quantify it. The basic way to do this is just to take every galaxy we can find, and calculate a correlation function with every other galaxy we can find. This tells us if the spatial layout of baryons in our present day has correlations at any preferred length scales. If you remember way back when the photons decoupled at recombination, the oscillations of our photon-baryon fluid got shut off, and the baryons were basically just left hanging out. Over the next 13 billion years or so, gravity started pulling them together and created all the stuff we know and love today, but the fundamental structure that was frozen in at recombination is still imprinted in the distribution of galaxies today. In other words, galaxies preferentially live in locations of the universe that correspond to areas where the baryon-photon fluid was highly compressed at the point of recombination. The fundamental length of this first clumpiness peak was set by the size of our universe pipe (remember, the universe is still a giant pipe) at recombination. So that is how the BAO peak relates to the first peak in the power spectrum.
The really useful thing here, is that by measuring the same thing at CMB times and now, we get a kind of cosmic ruler that helps us understand how the universe has expanded over the intervening billions of years. Ideally, we would make this same measurement somewhere in the middle (which is what the 21cm radio observatories are working on) to help put another tick mark on our ruler. Since the details of expansion are driven by dark energy, this helps us put some constraints on our understanding of what, exactly, it is (or at least maybe what it isn't).