One of the principal uses of compression is the control of level in vocals.
Many singers train for years to achieve the degree of breath control necessary for an even tone and expressive performance.
Other vocalists rely on an instinctive voice production technique, which may need help in the studio to maintain a consistent level, and result in a vocal track which 'sits' correctly in the mix.
The best way to even out the level of a vocal is to 'ride' the fader manually. When the vocal gets too loud, the engineer brings it down. When it gets too quiet, the engineer brings it back up again.
The compressor can do this automatically. It can't do it as musically as the engineer can, but it takes less attention, and can respond to faster changes.
The best way is to combine both – ride the level with the fader, then put the signal through a compressor.
The result will be a vocal that is consistent in level throughout the track.
The compressor can be applied to any signal that varies too much in level, even a complete mixed track.