buck compensation
1. The error amplifier is not just a comparator, it is an amplifier, whose open loop gain is generally large, especially at low frequency.
Compensation is necessary because in any feeback system you feed the output signal (divided down perhaps) to an input. At some frequency the input and output signals will be in phase, since all physical circuits will introduce delays. If the gain at this particular frequency is about 1, then the system will oscillate. Compensation ensures that the system does not have enough gain at the frequency where the two signals are in phase (or the two signals are not in phase when the gain is 1), thus avoiding oscillation.
2. I don't really know what you mean by that, but you can distinguish between a dominant-pole compensation (which is really simple, but lacks transient response performance) and a more complicated approach, that uses poles and zeroes to shape the response in order to obtain better performance, while still avoiding oscillation.
3. Closed-loop stability is guaranteed by meeting the two requirements I stated in 1: ensure the signals are not in phase when the gain is one (have enough phase margin, usually about 60deg) and ensure that when the signals are in phase, the gain is insufficient for oscillation to occur (ensure enough gain margin, at least 7-12dB). Both these criteria (plus a third one, namely a -20dB/dec at crossover) will ensure that the loop does not oscillate when closed.