they can be used at many different stages, as I mentioned. putting a hardware compressor on any signal, vocals, guitar, bass, keyboards, acoustic drums are all normal practices to smooth the signal out some before it goes into the converters (soundcard). there's nothing that says you can't use a compressor in the DAW after it's recorded, either, in fact, it's also a typically normal practice to compress more than once.
you can also use it in parallel with the signal. if you look at the PC compressor that comes with sonar, it has a wet/dry knob. basically what that means is that this compressor is being used in parallel with the incoming signal. basically it splits the signal in two, compresses one of them and then you mix them both back together using the wet/dry knob. the dry is the uncompressed signal, the wet is 100% compressed (at the settings you made).
or as a send/return. send return is very similar to parallel. you are still mixing a wet/dry signal together going into the soundcard, but you're using the compressor like an effect instead of in series like I mention I am using it above.
most people probably use compressors in series like I mention above for typical home recording use (and even typical professional studio use in most cases). signal >compressor>converters
most people would only use LIGHT compression settings for this setup because you don't want to overcompress going into the DAW - you can always over compress INSIDE the DAW if you want, but once it's recorded, you can't ever take the compression back OUT of it!