Class D amplifiers utilize a technique called pulse width modulation which is sometimes combined with pulse frequency modulation. The input audio signal is converted to a sequence of digital pulses whose width at any time is proportional to the amplitude of the signal at that time. The frequency of the pulses is typically 30 or more times the highest frequency of interest of the audio signal. Unfortunately the byproduct of the output of such an amplifier contains unwanted harmonics that must be removed by a passive analog filter. The output of such amplifiers usually work best with constant impedance crossovers since they can react a bit unpredictably with highly reactive speaker loads which is why these amplifiers are best suited for subwoofer applications or specifically designed amplifier and speaker packages.
The main advantages of a class D amplifier are efficiency and space savings. Because the output pulses have a fixed amplitude, the switching elements (usually MOSFETs) are switched either on or off, rather than operated in linear mode like conventional Class A /B designs. This means that very little continuous power is dissipated by the transistors except during the very short intervals of on and off states. The wasted power is low because the instantaneous power dissipated in the transistor is the product of current and voltage, both of which are almost always close to zero.