The use of compression is for controlling signal peaks, so if you want to reduce peak levels without affecting the dynamic range of the rest of the recording, the usual approach is to set a threshold that's just above the average music level. This way only the peaks are subjected to gain reduction, and the more compression you wish to apply to those peaks, the higher the ratio you'll need to set.
For example, for vocals, since the vocal is likely to be quite loud, careful setting of the compressor will allow the vocal to dip everything else slightly whilst it is present, helping it to stand out better. Between the vocal lines, when the singing stops, the lead instruments will come back up a little in level, so there will be less 'fighting' between vocals and lead guitars or keyboards.
The key to making overall compression work lies in setting the compressor sympathetically. Typically, a little gentle, subtle compression is all that is needed, with a very low ratio (perhaps 1.5:1 or 2:1) combined with a low threshold, so that the compression is working most of the time over most of the song's dynamic range. You would ideally be looking for between 4 and 8dB of gain reduction at most in this kind of situation, but this is a matter of personal taste and the nature of the track. If you are after a harder, more obviously compressed effect you will need to use higher ratios such as 3:1 or maybe even 5:1, but with a much higher threshold.
The topic of compression can go on and on, but that is the general concept.