Essentially, headroom is the space between the highest level a track reaches, and the level where clipping occurs.
If you’re a pro and submitting your mix for mastering at an external resource, you should give headroom (between -3 dB and -6 dB) on your master output. Likely, you’re also told to remove any pre-mastering processors, such as master bus compression, limiting, equalization, and to reduce frequency buildups and leave your mix dynamic.
The mix, handed over to the mastering engineer, should generally speaking be a 24-bit audio file, no dithering.
But what about us bedroom producers whom master our own shit, do we the need to care about any of this for our MP3s or uploads? No, but we could take these advices to help ourselves when mastering.
That is, when your mix is done and you’re about to enter the mastering phase (either you bounce your mix and start a separate mastering project or you do the mastering as a last step in a self-contained song project), remember these tips – your mastering process would gain from this.