When mastering, it is important to consider the distribution media that the music is created for. It makes a lot of difference whether the material is created for digital distribution or analogue media. These days, the common analogue media are vinyl records and sometimes even cassettes again (mixtapes!), both of which impose some restrictions. While both have a narrower dynamic range than digital media, this is not the main problem and other peculiarities are more important to keep in mind. On vinyl, distortion in the treble range is a common issue, which increases as the needle moves toward the center of the record. (This, incidentally, is the reason why the last track on each side of a classic rock / pop vinyl record tends to be a quieter piece, such as a ballad.) There are even some issues that can make it physically impossible to press a vinyl record, or lead to undesirable „emergency editing“ at the pressing plant. The bass and its stereo information is especially critical. Ideally, the entire bass spectrum should be mono if you're mastering for vinyl! If there is too much stereo information, separating the signal into mid and side components (M/S mastering) and processing the side signal with a low cut filter can be the cure. After converting back to a L/R stereo signal, the bass range will be mono.
Mastering for digital media is a bit more straight-forward. Sometimes, it becomes necessary to convert the sample rate, a delicate task which should be delegated to a very good piece of hardware or an offline computing process. Reducing the bit rate or resolution, as it needs to be done to achieve the 16 bits of the CD standard, requires even more attention. If the last zeros and ones are simply cut off from a 24 or 32 bit signal, a rounding error is introduced, which can lead to distortion. To prevent this, noise is deliberately introduced (believe it or not!), which changes the last digit arbitrarily. This process is called dithering and can be found in pretty much any audio editing software. There are, however, differences in how the system ensures that the noise does not have negative effects, while still making the dithering work. Several kinds of noise shaping are used for this purpose, and there is also Apogee's UV22 technique, which takes a slightly different approach.
Most editing software now comes with adequate means for encoding MP3 audio and other psychoacoustically compressed file formats. Don't forget to include the metadata! Track name, artist, album, track ID number within the album, catalogue numbers, copyrights—all of these things can be read by players.
If you're planning to have CDs manufactured, there are some things to keep in mind in addition to delivering the pure audio material to the pressing plant. Firstly, the audio material needs to conform to the technical specifications of the „Red Book“ CD standard (44.1 kHz sample rate, 16 bit resolution). Furthermore, a CD contains additional information such as gap lengths, song markers, and more, and there is a possibility to include hidden tracks. Instead of providing the pressing plant with a burnt CD, it is advisable to submit a DDP file (Disc Description Protocol). This includes all relevant information and reduces the risk of drop-outs, cracks and other problems that may otherwise occur during transfer. While this used to be exclusive to expensive specialty software, there are now many programs that can create such a document.