Dynamic range is the level difference between the quiet parts and the loud parts of an audio signal. A song that moves from a quiet intro to a big chorus, or a performance with a difference between soft and hard hits, has a wide dynamic range. The difference is expressed in dB.
The meaning changes with the source and the gear
Used about audio material, it refers to the span between quiet and loud within a performance or a mix. In equipment specifications, it refers to the range from the lowest level that stays above the noise floor to the highest level before distortion or clipping begins. With the same word, you need to check what it is describing.
Relationship to compressors
A typical compressor holds back loud sounds that exceed the threshold, narrowing the dynamic range. Raising the overall gain afterward makes the quiet parts easier to hear and gives an impression of increased density. Depending on attack and release, transients and movement also change.
Wider is not always better
Music with large contrasts can be more expressive, but in noisy places or on small speakers the quiet parts become hard to hear. Narrow it too far, though, and you lose the lift of the chorus and the punch of the drums. Choose a range that fits the genre, the playback environment, and the intent of the song.
How it differs from headroom
Dynamic range is the span between loud and soft within the sound, while headroom is the margin from the current peak level up to the ceiling. Turning down the output of a heavily compressed source creates headroom, but it does not automatically bring back the contrast that was lost.
Check with meters and with your ears
The difference between peak and RMS, changes in LUFS, and loudness range are clues to what is happening. Still, no single number defines expression. Listen through both the quiet and the loud parts, and compare before and after processing at matched perceived loudness. The loudness adjustment tool lets you check peak and LUFS.
