Producing an audio creation is usually a 4 part process:
Recording is quite obvious, as the name says it means recording the musical creation itself. As much as you've probably heard, using great gear for recording infact does make a difference later when it goes to the mixing and mastering stages. Low quality gear tends to add unneccessary noise to the recording, and also may not capture the sound and miss some depth. Not something that you can't get rid of, but still recording a singer with a 2000$ Shure Microphone -vs- recording him with a computer home microphone is a HUGE difference.
Sequencing is the next part of an audio production, its mostly the creative process of composing the musical track itself - arranging your audio tracks, what piece comes first, what comes next, what goes together, audio effects (Reverb, delays, etc). During this stage, usually the artist itself will perform "mixing" in terms of balancing the volume of audio tracks, but that is far from what professional mixing is...
Mixing is the process of balancing the different audio tracks in terms of volume, and frequencies (EQ), to make them "heard" together. This is a little bit more than just balancing the volume itself. On some instruments, you need to add more brightness (for example: on Hihats or Cymbals of drums), on some you need more bass (for example: Bass drum, Bass guitar, etc), and also good mixing involves knowing how to balance the instruments realy well in terms of frequecies and sometimes even seperating a few instruments that share the same frequency range using sidechain ducking. For example, if a Bass guitar and a Bass drum both share the audio spectrum of 60-200hz, simply mixing them together will create an overload in this frequency range that will "swallow" other instruments, which is not good at all. So SOME techical knowledge is required from a realy good mixing producer.
Mastering is the final process in the production of audio. And this, plus the mixing part, are usually the parts that makes the whole difference between a commercial breakthrough album to an amateur one. A great example would be Nirvana's "Nevermind" album. In terms of the music itself, it is ok. But combined with a great mixing producer and a great mastering, that album became one of the best albums ever sold. So what is Mastering? Mastering is the process of taking the final mix, which is usually "low" in volume, and usually made on reference speaker, and doing all sorts of things in order to get it to be "ready" for a commercial release: Amplifying the overall volume, Balancing the instruments correctly (in case the mixing producer missed them), monitoring it on high-end speakers instead of reference speakers, testing it on a wide variety of different speakers, and much more. Mastering engineers are usually people with both very accurate hearing ears, and both technically gifted in terms of perfectly controlling a wide range of audio processors that the average person have no idea of, and that are neccessary for cleaning, polishing, and balancing the final product for commercial release (For example: Multiband compressor, Noise gates, Hiss removers, and more).
I hope this answered your question.