Mixing takes place on a mixing console that receives input from any instrument or device that is mic'ed. The process of mixing involves adjusting the volume levels and setting the EQ levels on all of the separate tracks to achieve the desired overall sound.
Mastering is the final stage in the recording process. It usually involves running the songs through a software program that checks it for glitches and errors and boosts all of the overall levels to give the recording a more polished, commercial sound. Final mixes are noticeably quieter if they have not been mastered.
Mixing and mastering, at a professional level, usually take place in two completely different rooms. Mixing rooms often do not have the proper acoustics to successfully master a recording because mixing rooms contain much bulkier equipment that disrupt sound waves. Mastering is largely dependent on the ear of the engineer. The best mastered recordings come from a room with pristine acoustics and quality speakers.