Fundamental component of Sinusoidal PWM inverter output
Maybe this picture will help: -

(source: elweb.cz)
There are three waveforms: -

Basic sinewave (red)
Triangle wave at PWM frequency (one triangle occurs in one switching cycle) in green
PWM waveform at bottom of picture (blue)

If you look at the PWM waveform (blue) and averaged the high/low content in each switching cycle, you would get varying numerical values that followed the basic waveform of the sine wave. Switching cycle: -

So, for the 1st cycle, the average is about 25% and, for the second cycle, the average is about 60%. You don't need a calculator to estimate this, just use your eyes and ask yourself how much of the waveform is &quot;high&quot; in a particular switching cycle then move onto the next one.
It's got nothing to do with frequency modulation or harmonics, just averaging. Averaging can be done by basic resistor, inductor and capacitor combinations aka &quot;low pass filters&quot;.