Audio compression is used to change the differences in level of a piece of music or other sound source. Dynamic range is the difference between the loudest and softest passes. The range of loudness and softness of music today can vary greatly. Much of pop music has a low. This means the difference between the loudest and softest parts is small. A good level of dynamics in a current piece of music might be 14db where as a very limited and compressed example could have just a few decibels of range.
The method for controlling the range of dynamics is known as compression, and in some extreme cases it is then labeled as limiting. Then there is the opposite of compression which is known as expansion. This has the effect of making the dynamic range greater by lowering the lowest levels and allowing the higher levels to have more gain.
Within a piece of music itself there are macro and micro dynamics. Microdynamics would include things like percussive transients that are occurring frequently in the music in time with the rhythm. This can also be expressed as the 'groove' of a track and is a large part of what gives music its energy. On a larger scale comes the macrodynamics. This is the range of certain sections of the music, for instance an intro compared to a chorus or verse.
A compressor is then employed to control these sections, mainly the microdynamics to give them a more even consistency. Loud peaks are brought down in volume so the whole program material can be brought up, so leveling out the differences in dynamics. This results in less dynamics or a reduced range and is one of the most common ways to process audio.