Mastering is a process that brings a mix up to a commercial level of loudness (taking into consideration the track's genre) and optimizes it for playback across different formats (CD, vinyl, streaming, etc.). You apply master bus processing in order to achieve this. Mastering also involves the use of various meters and requires you to meet certain technical standards, particularly when mastering for iTunes.
People are often confused as to what goes on during the mastering stage. The truth is that every mastering engineer has their own methods of mastering and their own personal preferences when it comes to taste. Your job as a producer/mixing engineer is to find a mastering engineer whose taste you like and trust.
Analog and digital (in-the-box) mastering both yield their own particular sounds. Analog mastering typically provides this unparalleled warmth that digital mastering has a very difficult time emulating. Running your music through hardware units as an electrical current adds this body that many people really enjoy. On the other hand, you have digital mastering. Compared to analog mastering, digital mastering colors your mix less and can provide a more pristine, transparent result. A lot of EDM artists really like the sound of digital mastering. EDM evolved on laptops and a digital sound is what many artists seek out when mastering.
The best way to find out what type of mastering you prefer is to submit the same project to receive digital mastering and analog mastering. At Black Ghost Audio, we run mixes through our hybrid mastering setup. We use a combination of analog and digital mastering tools to achieve the sound that our clients swear by. We're able to combine the best of both worlds, resulting in a process completely unique to us.