It's important to remember that a compressor does not make a sound louder, it reduces dynamic range. By bringing down the peak values, you give yourself more headroom to bring up the overall signal level (so the quieter parts can be louder).
It is that "make up gain" which makes a sound louder, not the act of compression. The choice between using compression and volume should be dictated by the needs of the context and how important transient information is to the signal you're working with. Something you might want to try experimenting with is parallel compression.
You duplicate your signal, by either duplicating the track or using an aux send, and apply compression with make up gain to that second signal. Then you have simple fader control over the compressed signal that you add in to your unprocessed original.
It's not the right choice in every context, but it's another option...and it can help preserve the transients while giving you the ability to increase the perceived level of the sound source.
EDIT: I should also note that compression does not necessarily act on the only the peaks of an audio file. It's all based on attack and release time. It can actually be used to enhance transients, and even affect harmonic content within your signal. There's a lot more to compression that just crushing the dynamic range to make things louder, and it would be wise to start exploring those.