On designing an amplifier to be used in a feedback circuit, stability should be ensured with a minimum phase margin of 45 degrees for reduced ringing effect (actually 60 degrees PM is considered the optimum case I believe) .If the designed amplifier is unstable or with a small PM when placed in the feedback ciruit, compensation should be applied .One way is to shift the dominant pole to a lower frequency to use the -20dB/dec of this pole to shift the GCO (gain cross over) frequency to come before the 1st non dominant pole (phase at this pole would be -135 i.e min PM of 45 is ensured) .Miller compensation uses Miller multiplication effect to reduced the required capacitance to shift the dominant pole and also performs what is called "Pole Splitting" which moves also the non dominant pole for higher frequencies .
For more information, please refer to "Design of Analog CMOS Integrated Ciruits" by Razavi ,2001 chapter 10 .