I assume they set a target of, say, -14 LUFS (Loudness Units Full Scale), take a reading of the integrated value for the whole track, and then turn the volume of the whole track down by whatever dB value will hit the target.
This avoids the problem of cruder methods, where you take, say, the peak dB as the "loudness" of the track. Doing it that way would take a fairly quiet song with one overly dramatic drum hit and make it so you couldn't hear the rest.
EDIT: I think they will also turn a track up if it's under the target, but I'm not absolutely sure. There would be no real reason not to.
I think they mentioned ReplayGain with AAC and ogg formats, but it's possible they use some custom implementation. There's a good deal of information[1]; it is indeed not peak normalization:
> ReplayGain is different from peak normalization. Peak normalization merely ensures that the peak amplitude reaches a certain level. This does not ensure equal loudness. The ReplayGain technique measures the effective power of the waveform (i.e. the RMS power after applying an "equal loudness contour"), and then adjusts the amplitude of the waveform accordingly. The result is that Replay Gained waveforms are usually more uniformly amplified than peak-normalized waveforms.
Generally we indeed target both up or down in loudness (although 'up' is quite rare, typically high-end recordings of classical or jazz or otherwise very dynamic pieces).
Honestly, everything I read screams that Spotify really hired the right people to make these decisions.
Now I only have to rent about their handling (or rather, lackthereof) of metadata — how hard is it to display an actual first release date? but meh. Audio quality is great, no question about it. I just wish they'd stream FLAC in very-high quality + "quiet" environment settings (the "pure hi-fi" experience so to speak), but that'll come in due time I suppose.
This avoids the problem of cruder methods, where you take, say, the peak dB as the "loudness" of the track. Doing it that way would take a fairly quiet song with one overly dramatic drum hit and make it so you couldn't hear the rest.
EDIT: I think they will also turn a track up if it's under the target, but I'm not absolutely sure. There would be no real reason not to.