You by definition don't master while you're making the track.. mixing and mastering are technically the same things (similar goals, similar tools) so it's more about the distinction you make yourself.
This track is done, time to mix. This mix is done, time to master.
Real mastering is always best done by another pair of ears and hands too... the 'second opinion' part matters a lot.
Mastering also involves producing the actual master files, applying a consistent balance to an entire set of tracks (eg. an album)... maybe even producing different version for different purposes (HD-audio, louder, softer). It's really about finalizing the product, making it a release-ready package.
If you hire a really high-end top class mastering engineer, some of them will want to get involved in the entire recording and production process. I know that for instance Mandy Parnell does that and considers herself something like the guardian of the entire process, making sure it's done to the highest standard from the beginning right up to when it hits the stores.
That said, it definitely helps to be aware of mastering and there is a lot you can do while making and mixing the track to ensure a great master.. where the engineer can do their job, instead of just troubleshooting yours. Making sure you hit the appropriate levels without incidental peaks. Making sure you don't squash every dynamic to bits or blow out your stereo image with artificial wideners... in short: mix the damn thing right.