What is "Mastering"?
Now THIS is an easy question: "mastering" is the job of taking the finished audio recordings and preparing them for reproduction.
You take the final tape or 24-bit stereo wav file or whatever it is that represents the "finished" studio recording, and from that you produce your glass CD master, your pressing disc for the LP plant, or whatever will be used from now until forever to produce the copies that will be sold at retail.
This highly-technical step is important for wide commercial releases: the creation of the final master should ensure that every CD player (or record player, or mp3 player, or whatever) is going to reproduce this correctly, is going to understand the transitions, pauses between tracks, track numbering... that the needle isn't going to skip tracks because the grooves were cut outside tolerances, that older CD players aren't going to unleash a full-scale buzzy clipping at track transitions, that there aren't any digital errors that are going to make the CD unreadable by some brand of CD player, and so on.
Creating a fault-free duplication master is not a terribly difficult job, but it's one of those things that is worth getting right before you stamp and ship a million copies.
That's what mastering is. But I'll bet that didn't really answer your question.
Step into your time machine and set the dial to sometime before, say, the early 80s. Sometime before digital reproduction was common. Now step out of the time machine and go visit a record-mastering lab, the kind of place where they engrave the discs that will be used to stamp actual vinyl records.
The people who work at this facility have a considerably more demanding and technical job than the modern "mastering engineer" has. For starters, the "record" they are receiving if usually a pile of reel-to-reel tapes. The tapes may have been recorded on different machines, at different speeds, calibrated differently or incorrectly-- who knows what (hopefully there is good documentation). The final "track listing" is a piece of paper that tells them what order to put the songs in.
Analog transfer between different mediums is not an exact science, especially when the starting mediums are not identical to begin with...
For example, a track cut at 30ips will sound more detailed but hissier than a track recorded at 15ips, for example. And your pile of tapes might include stuff that was tracked at 15ips but mixed down to 30ips, or who-knows-what. Maybe with varying types and degrees of noise-reduction, and so on. So for starters, there is a high probability that the various album tracks will all have noticeably different amounts of hiss and SNR. Unless you want the album to "pop" and/or noticably change hiss levels at every track transition, you are almost certainly going to have to do some work on this.
For seconds, if any of the tracks or "finished" mixes were done at different studios, or at different times, or by different engineers, or on different tape machines, then there is a very good chance that these tracks have never actually been listened to in sequence before: changing a reel of tape takes time, and the probability is very high that many tracks will have serious instrument or frequency imbalances. E.g., that the snare drum or bass or vocals will be much louder on one track than another, etc, or that some tracks will sound much more midrangey or bass-heavy or whatever. Not "bad", mind you, just different aesthetics, different approaches that will nevertheless end up sounding jarring or distracting on a finished album. One of the most obvious examples is the mellow, steady-state ballad that takes up the whole dynamic spectrum and that ends up sounding twice as loud as the hard-hitting rock or funk track that needs headroom for big dynamic swings. This is a pretty obvious opportunity to improve the overall album by making some adjustments.
For thirds, there are some pretty serious technical considerations when "mastering" to vinyl records (less so for CD). Magnetic tape heads are different from metal needles weaving their way through record grooves, and stuff that plays just fine on tape might not remain centered in the groove, or might cause the needle to skip, or might cause one groove to cut into another, and so on. There are a variety of "rules" for cutting vinyl, and making a tape mix fit into those rules may require a certain amount of eq, stereo field manipulation, and compression on purely technical grounds, completely setting aside aesthetic considerations.
(pause): you may be starting to get the notion that mastering engineers, in the old days, basically HAD to do a certain amount of sonic re-processing to the "finished" mix, just as a routine part of getting the tracks fit for reproduction. And you may also be getting the impression that some of this processing blurred the line from strictly "technical" functions into more aesthetic/subjective decision-making. This would be a correct impression. (un-pause)
For fourths, the mastering engineer has a very privileged high-level view of the overall recording, in a number of ways: 1. She has never heard these tracks before, and has no emotional or personal investment other than producing the highest-possible sound quality; 2. She might work on a hundred professional recordings per year, without the tunnel-vision of a producer or band who might have only done 3 records in their whole career so far; 3. She is typically working in a very technically "pure" environment, a well-made listening room with just a few high-quality processors, removed from listening couches and arguing band members and a million knobs and faders to keep track of, removed from racks of noisy gear and comb-filtering from a giant mixing console under her face and the wear-and-tear, stress, and ear-fatigue of a working studio...
In short, she has the "critic's privilege": she gets to listen to and analyze the results, completely removed from the process, emotion, turmoil, doubt, and complexity of having made the thing. Couple that with an expert ear, top-flight equipment, and hundreds of album's worth of experience, having heard the results of her own work on the radio, in nightclubs, on home hi-fis, in car stereos, on headphones, etc... she is in a *very* good position to spot any number of obvious flaws or opportunities for sonic improvement.
So still in our time-machine, and considering all of the above, it is not surprising that a number of mastering engineers would emerge with reputations for not only producing technically correct and error-free reproduction master copies, but who also added an extra layer of polish, professionalism, and "magic" to the records that came across their desks.
Even just the rudimentary, technical basics of noise-reduction, setting the song levels appropriately, setting appropriate pauses between tracks, and doing the fade-in/fade-out and tuck-and-tails correctly could make the "master" sound noticably more polished and professional than a simple spliced-together tape of the various mixes.
Add to that the mastering engineer's ability to "fix" problems with the source mixes, such as a too-mushy kick drum on this track, or a too-loud vocal on that one, etc, and the "master" could often come out sounding dramatically better.
But none of that is actual "mastering". It's "pre-mastering" or stuff that the engineer does before the technical work of creating the error-free master copy. In fact, it is typical that the mastering engineer would send this tape to the producer for review before cutting the master pressing disks. In other words, all of the "magic" of the mastering process happens before the "mastering" even begins.
This is an important distinction: the mastering engineers of yore did pull out their equalizers and compressors and stereo controls to "improve the mix". They pulled out those tools to get the needle to stay in the groove. While they were at it, they also used those tools to get the noise levels and track levels balanced, the crossfades sounding natural and balanced, and the overall frequency balance consistent from one track to the next. While they were at it, they took advantage of obvious opportunities to improve the mixes, especially "problems" revealed by the new stereo and frequency balance.
the net result was often records that sounded better than the original studio recordings.
If you have read through the above, you might already have a sense of where this is going. Certain mastering labs and individual engineers began to emerge who had a reputation for adding a full letter grade or two to the sound quality of records that they worked on. Send your tapes to one of these guys, and the masters would come out not only technically correct, but sounding better than they went in.
Now get back in your time-machine and flash-forward to 2010: "mastering" CDs, mp3s, etc is a fairly trivial, automated, and software-run task. On a million-release CD, it's still worthwhile to have it done by an expert, but the cost is negligible.
What has remained is the notion of "golden ears" mastering engineers (really pre-mastering engineers) who put an extra layer of sonic spit-and-polish on the mix before the CD factory runs it through error-checking and the stamping machine. In fact, in a purely digital universe, a pure "mastering" lab doesn't even need to own a pair of speakers: they are simply producing an error-free glass master that meets the technical specs required to cut commercial CDs.
Increasingly, modern "mastering engineers" are often not even providing a master pressing copy: they're just running the mix through some eq, dynamics, exciters, delays, whatever, and then giving you back a modified digital file that the pressing factory is expected to reproduce exactly. It's more like "post-mixing". There is no longer any technical element to it, you're just hiring somebody to second-guess your mix as best they can, without giving them the source tracks.
Now, this or that "mastering engineer" might or might not have better or more expensive gear than you do, or a better room, or whatever, but in a purely theoretical sense, there is no technical reason why you couldn't do everything they do if you bought all the same stuff. You're paying them for their judgement, tools, experience, and skill at making it "sound better".
In short, modern "mastering" (as it is commonly thought of) is really just re-eqing, re-compressing, re-reverbing, etc of your existing "finished mix", usually with some help on the fades, track levels, and tuck-and-tail. But increasingly there are "mastering engineers" who work one song at at a time, so even those last criteria of album flow and sonic cohesion are absent.
This does not mean that modern "mastering" is worthless: on the contrary, it is often by far the cheapest and easiest way to get a second opinion and extra help from a set of expert ears with expert gear. But it has also become one of the easiest ways for someone with a computer to make money from people who don't know what they are buying. You could run a typical home recording through maxxbass, L2, and BBE presets and send it back to the client without even listening to it, and half of them would rave about your magic touch and recommend you to all their friends. (And maybe they'd be right... sometimes it seems like that is what recording is coming to: who knows...?)
As the process of reproduction becomes more and more automated, the role of mastering engineer is an increasingly consultative one. The professional mastering engineer is an expert set of ears who gets paid first to tell you the obvious things that are wrong with your tracks, and secondly to put a final coat of spit and polish on them. And that's still a valuable role: even very skilled mechanics and carpenters still hire specialty subcontractors to do the finish work.