The difference in how A achieves zero volts, and how B does it.
With Class A, 0 V is achieved by the + and - transistor banks being fully on. Because they are balanced, there's no voltage, but full current and a whole lot of heat.
B achieves 0V by both banks being off. No current, no heat. Trouble is that the first couple of volts of a transistor are not linear. They need to reach a minimum threshold to turn on and respond to the input.
Class AB is a compromise where 0V is achieved by both banks being on, but only a little, and when voltage swings enough one bank turns fully off. High efficiency, low distortion.