These days, mainstream software DAWs offer a fantastic array of dynamics plugins, enabling anyone to achieve upfront-sounding modern releases. However, it's easy to end up with flat and lifeless mixes if you're not careful, so I'd like to pass on a few tips for avoiding this.
The main culprit is compression, the most common slip-up here being over-processing. For a start, a lot of people simply compress more of their tracks than they actually need. Just because there's a compressor built into your channel strip, it doesn't mean you have to use it! If a sound already maintains its level in the mix balance consistently, then compression may be totally unnecessary.
Clearly, though, many raw tracks (especially those of acoustic instruments) will need their levels evened out to avoid their ducking and diving undesirably in the mix. The big mistake here is to use too high a compression ratio, crushing only the louder notes in order to make the rest of the performance more audible. For more natural-sounding results, try keeping the ratio below 2:1 and then reduce the compression threshold further to get the gain-reduction you need. That way you reduce the overall dynamic range, while still retaining the internal musical level-relationships between different notes. This can be tremendously effective with acoustic guitars and pianos, where ratios as low as 1.2:1 can be very effective. Switching in your compressor's soft-knee mode (if it has one) can also help by introducing gain-reduction more gradually around the threshold level.
The main reason I think people over-compress is because they want to emphasize an instrument's sustain, and to be fair there's usually a limit to how far you can do this with traditional compression before things start sounding horrible. A useful workaround here is parallel compression, which involves setting up a compressor as a send effect, so you can mix the compressed 'wet' signal in with the uncompressed 'dry' signal. This setup lets you absolutely mash the parallel-compressed signal in pursuit of maximum sustain, knowing that the uncompressed signal will preserve natural-sounding transients in the mix — a scheme that's well-suited to drums, tuned percussion, and acoustic guitars/pianos. Do be careful, though, not to mislead yourself into thinking your parallel compression is making an instrument sound better, simply because fading up its compressed channel makes it sound louder!
There is a misconception, too, that hammering a track with compression is the only way of drawing out the elusive tonal 'magic' from software emulations of classic hardware units. While specific analog compressor designs do have unique gain-reduction characteristics, a good deal of their unique sound actually results from their circuit-distortion characteristics. What this means is that you can often add more 'color' merely by feeding them a higher input level (rather than by compressing more heavily), maybe using a simple gain plugin earlier in the channel's processing chain.
Another way compression can kill your dynamics stone dead is if the attack and release times are too fast, effectively steamrollering all a signal's delicate short-term level peaks/troughs. For example, super-fast compression on drums will simply flatten the peaks, which is rarely desirable, whereas slowing the attack time will rescue some of each drum's onset transient. Slowing the release time slightly can make the compressor's gain-reset action more audible in its own right too, which can actually add a sense of dynamic movement that wasn't originally there! This is especially relevant where mix-buss compression is concerned, as the audible 'pumping' of a compressor's release phase following strong drum hits is an important mix ingredient within many rock genres, so be prepared to experiment extensively with release times in such scenarios.
Of course, if your transients are actually too sharp-sounding, then fast-attack compression might seem the simplest solution, but in my experience you'll usually sacrifice too much musical dynamics before achieving sufficient transient-softening in this way. A dedicated transient processor is typically a better option here, as it detects transients in a different way, allowing you to turn them down without impacting on the overall musical dynamics nearly as much — great for reducing stick noise on cymbal mics, for instance. In many situations, though, harsh transients are actually restricted to upper frequencies, in which case their level peaks can be easily managed using the upper band of a multiband compressor, while leaving performance dynamics in the rest of the spectrum unruffled. Indeed, where upright-bass string slaps or acoustic-guitar pick noise are particularly aggressive, this is sometimes the only technique powerful enough to salvage a usable sound without unacceptable negative side-effects.
Despite the undeniable capabilities of the latest audio processing technology, though, it's vital to understand that you can't entirely rely on plugins to deliver great-sounding mix dynamics. The other essential ingredient is mix automation. The problem with most plugins is that they only consider the signal they're processing in isolation, whereas one of the first rules of mixing is that all decisions depend on the mix context! So even if you compress your lead vocal to death, for instance, its level won't adapt to the different requirements of your song's verse and chorus, say, or to the unpredictable masking effects of things like cymbal crashes. This is where many project-studio engineers come unstuck, because they try to compete with the sound of extensively level-automated commercial mixes by misguidedly pushing their dynamics processing too hard. Lead vocals are naturally the mix component that receives most attention as far as automation is concerned, so be prepared to spend at least a couple of hours per mix carefully automating vocal levels if you're aiming for a major-league sound. Don't neglect bass parts, either, as a single weak-sounding bass note can be enough to drain impact from the arrival of your music's hook section.
Automation isn't just about maintaining mix levels without over-compression, though. It's also about improving the musical dynamics of the ensemble, or even generating them from scratch! When performing together, great performers naturally adjust their balance in response to the music. So, for instance, a piano accompanist will play with restraint while a solo vocalist is singing, but will then play louder for fills in the gaps between sung phrases. In a project-studio environment, though, this kind of musical interaction rarely occurs in practice, because so many productions are built up using programmed MIDI parts or single-instrument overdubs, or else ensemble performers simply aren't that great. This is where automation can step into the breach. All you have to do is listen through to your mix, ask yourself what elements of the arrangement are most interesting at any given moment, and briefly turn them up. You might want your Hammond organ part to stay in the background most of the time, perhaps, but that doesn't mean you shouldn't use automation to fade up the odd cool-sounding glissando. Likewise, if your bass part just chugs along on half-notes most of the time, why not make a feature out of those couple of moments where it offers a more engaging snatch of countermelody?
If you master your own work, that's another stage of the production process where hard-won mix dynamics are frequently thrown away by using brick wall limiting to achieve higher perceived loudness. The easiest way to avoid this, in my view, is to match the perceived loudness of the mastered and unmastered mixes when comparing them, because this focuses your ear on the subtleties of any processing side-effects, rather than the seductive appeal of the loudness hike. In drum-heavy styles, it's also worth realizing that saturating or clipping the drum peaks may deliver a more appropriate blend of processing side-effects than dynamics processing — although the increased distortion level during drum hits may change their tone, that may be less undesirable than the level-reduction imposed by heavier limiting.