Related to vocal recording, I see some answers that talk about compression.
What exactly does compression do, and why and how is it used?
Compression in this context means compressing the dynamic range of an audio track. In a nutshell, it's making the loudest parts of the track softer.
Of course it's more complicated once you get into it. You can find all the details in this Wikipedia article on the subject.
There are many different reasons to use compression:
A compression effect compresses the dynamic range of a track or in other words it makes the volume of an track more even
It can have many uses but the most common is to iron out inconsistencies in an audio tracks volume. This can giving a impossibly consistent sound to a performance which is often desirable when processing things like vocals.
It can also be used for creative effect or in sound design as depending on the source and the settings used the effect can be quite pronounced. A snare drum for example which has a large transients and a huge dynamic range can sound very different when compressed.
Analogue equipment used in the past had compression built into it, as a natural artefact of how it had to be used. When mastering a recording to vinyl, it was essential to limit the dynamic range to stop the needle from jumping as the record was played. Also analogue tape technology never quite manages a perfect reproduction of the original sound and performs a kind of natural compression of its own. I used to love the sound of my first 4-track machine (despite the hiss), and I now know that what I loved was the way it naturally compressed the signal.
These factors mean that classic recordings always have some compression to them. This is part of the reason why people are often disappointed by the sound of digital recordings. They describe them as "cold" or "empty" or "lifeless". But add some compression and suddenly it seems more warm, alive and familiar. Really it just sounds a little more like an analogue recording would have sounded.
A simple way to make a track sound more "old fashioned" is to put a little reverb and then compression on the whole mix. It makes it sound like it was recorded live in a single room on analogue equipment. The early Beatles albums were recorded on two tracks. The band would play a backing track, and then the singers would do the vocals on a second track while listening to their backing track on a speaker (headphones had not yet become commonplace). This means that the vocal track picks up the playback reverberating in the room, and is then compressed. It may have been a crude, accidental technique, but it adds a lot of atmosphere to the final mix.
So my answer to the question "why use compression" is: to make digital recordings sound more like analogue recordings.
Edit: Looks like compression may have another meaning I'm not aware of, and may be more of what you're getting at. This question may provide answers.
The why: To save space. To store a perfect replica of analog information like sound waves digitally would theoretically require infinite space, so there's always some sort of compression going on.
The how: Lots of ways. One simple method is by decreasing the resolution, or step size. A curving analog wave becomes a jagged series of straight lines when represented digitally (think of a staircase). By increasing the size of the steps, you decrease the number of steps and thus the amount of information stored, at the cost of audio quality.