Compensation is necessary when feedback is applied to an amplifier to ensure stability by controlling the location of poles. Instability occurs when the phase delay decreases too slowly relative to the gain, causing the output to grow without bound. To fix this, a dominant pole is added to guarantee that the gain reaches 0 dB before the phase reaches -180 degrees. This distance of the phase from -180 degrees at 0 dB gain is called the phase margin. To make an unstable system stable, a pole must be moved to a lower frequency so that the gain drops below 0dB before the phase of -180 degrees is reached, as seen when analyzing bode plots.