Mastering is all the stuff that's done to your 2-track audio files once they're all mixed to prepare them for the final release format.
For a CD release that includes any audio finalizing (what most people think is mastering), putting the songs in order, setting the space between them, placing track and index markers, creating a track list with the required info and anything else needed before it gets replicated.
For an internet release it would be the audio finalizing, conversion to the appropriate format and filling of the track info fields etc.
The process for vinyl is similar but uses specialized equipment, and there are certain limitations to the medium one has to be aware of. Some of the traditional audio finalizing processes derive from what mastering engineers had to do to get a mix on tape to fit into the vinyl format.