the short answer is that mixing is what you do to multitrack recordings, mastering is what you do to the finished stereo mixes. In the mastering process you can no longer play with the individual tracks - whatever is done is done to the mix as a whole.
The purpose of mastering is to have a skilled mastering engineer listen to your completed mixes with his/her trained ears in a pristine acoustical environment on very high end speakers and amps. Then using specialized hardware and software, the engineer tweaks the mixes to make them so that they will sound as best as possible on any system they may be played on, usually by using very high end compressors, eq's, and occasionally reverbs.
That's where the magic comes in. Then there is the more mundane functions of cleaning up noise, balancing tracks so that their volume is proportional to eachother, adjusting fades, and ordering the songs. That's the part that maybe "anyone" could do with some mastering software. Unfortunately, the software doesn't come with skills, ears, or an acoustic space and/or speakers included.