One component of this process was to make the mixes sound a little better. Another component was to match tracks across the disc in terms of level and frequency balance. But by far and away the most important part of the mastering process was to optimize the signal for the vinyl medium; to maintain fidelity, to achieve a good degree of loudness, and to make the disc physically playable on anyone's record player, no matter how cheap-and-cheerful.
These days we have near-perfect digital audio, so the object of mastering has become to make the mix sound absolutely as good as it can possibly sound... better, fuller, stronger and - most of all - louder. Indeed the quest for ever greater loudness has become known as the 'loudness war', and a mastering engineer must be able to do battle in order to win and keep clients.
The first part of the mastering process is to clean up any defects in the mix. There may be noise audible at either the start or the end. There may be clicks. These faults must be corrected first. Next, there may be an inappropriate balance of frequencies. Most commercial releases have pretty much a similar balance of frequencies and any new release needs to fit in well with what's out there already.
The next challenge is to make the sound louder. This is done using powerful techniques such as look-ahead limiting, multiband compression and normalization. Harmonic generation processes might be used to thicken up the sound. Done well, this really can improve most mixes. However there is a point where although the degree of subjective loudness is increased, the audio quality is starting to suffer. An experienced mastering engineer will find the point at which the sound has the most commercial potential, but isn't degraded in a way that the average listener would find objectionable.
Great home recording starts with a great home recording studio. It doesn't need to be expensive if you know how to select the right equipment for your needs.