Mastering is the preparation of a final tape or soundfile which is suitable for reproduction, broadcast, or performance.
The mastering process involves:
sequencing selections into the desired order with the right amount of empty time (if any) between them;  performing any final global spectral and dynamic processing (equalization, compression, etc.) that might be needed on individual selections; and  checking the overall dynamic balance between selection.