A Class D audio amplifier uses pulse-width modulation (PWM) to amplify audio signals with high efficiency of around 90-95%. It works by comparing an audio input signal to a high-frequency triangle wave, generating a PWM signal that drives an output stage. A low-pass filter then removes the high-frequency components, leaving the amplified audio signal. While more efficient than linear amplifiers, Class D amplifiers can have imperfections like dead time between switch transitions that introduce distortion. Dead time as small as tens of nanoseconds can generate over 1% total harmonic distortion. Proper timing of gate signals is important for low distortion.