Class D amps convert the analog waveform from the preamp into a series of pulses that go instantly from 0-100%. Typically, the width of the pulse is varied with the audio. Then, it all runs through a big power inductor that converts everything back to the analog waveform.
Why bother?
1. When transistors are partially on, as during 99% of an analog waveform, they are just acting as a big variable resistor, so they dump the excess energy as heat (that is why they get hot!). The class D amps are only ON or OFF so there is no heat producing effect.
2. Because they are only ON or OFF, the transistors can be a much lower quality type for the amount of power that they handle. They don't need to be low distortion or quiet because they are just an ON and OFF switch, where you can't tell that they are less than perfect. The transistors are generally types that are used to drive motors, etc.
The end result is that you can get a very powerful amp that can be small because it doesn't need big heat sinks and ventilation, and it can be lower cost for the power generated.
Problems with Class D amps is that it is hard to get the pulse rate high enough that it does not interfere with high frequencies. This is why you see Class D used mostly for bass and not for full range sound.