Tragus - By all means, do follow Skogs' advice and start studying from the very basics. It's a fascinating subject at all levels. I've been working with these circuits for 30 years now, and I'm still learning lots, and I have plenty more to learn. (I just did an analysis of the nanometer-level oscillations that the pulsing causes in frictionless precision systems - lots of surprises there!)
I will explain a basic concept to get you started. These days, most PWM signals are generated purely digitally, as Skogs stated. In most, there is an up/down counter circuit incrementing at a high frequency -- our latest design uses 300 MHz, which is higher than most, but 100 MHz is pretty common these days. The limiting number on the counter before reversal sets the frequency of the waveform. If you are counting at 100 MHz, and have the counter turn around at +/-10,000, you will have a 10 kHz waveform. Each increment of the counter, it is compared to a digital command number generated by the software control algorithm. Depending on whether the counter or the command value is greater, the output is high or low. This output is the PWM command signal. The percentage on-time is proportional to the numerical command value.
Using PWM for AC motor control adds an additional level of complexity. As JadeYork points out, the term VFD is not used for DC motor PWM drivers, because there is no "variable frequency" in this DC motor control. The variable frequency in AC motor control is the frequency of the voltage and current waveforms in the phases of the motor, usually in the range of tens of Hertz. So there are three key frequencies in a PWM VFD: the phase voltage/current frequencies in Hertz, the PWM (and control algorithm) frequencies in kilohertz, and the counter frequencies in megahertz.
Curt Wilson
Delta Tau Data Systems