Traditionally, music is recorded with the help of an engineer and producer. The role of the engineer is consistent. The engineer is responsible for the technical aspects of recording, capturing the appropriate levels, handling hardware, troubleshooting problems and running the recording equipment.
The role of the producer is far more flexible depending on the recording project. If the artist in question has written and arranged their material or has a specific sound in mind, the producer can have a role as minimal as overseeing the recording; alternatively, the producer's role can be as large as writing and arranging the material and shaping the "vision" of the work. Some producers are hired to help bands or artists achieve a specific sound, while others work closely with the artist to develop material to record. The producer plays a very large role in mainstream pop, R&B and hip-hop, in which vocals are usually the only aspect contributed by the artist. In this instance, the producer serves as a composer.
Mixing is one of the most important aspects of production. Mixing refers to altering or shaping specific aspects of the "mix" of tracks recorded. This can include boosting some levels and lowering others, as well as adding effects. These are the finishing touches that affect how the different parts sound together. A good mix is one in which no one part overpowers the others and everything is clear and audible.
Mastering entails normalizing the volume of various tracks. If one has a CD of recorded songs, it is preferable that loud songs are not too loud and the soft songs not too soft. This gives the recording a finished, professional sound.
Learning the ins and outs of audio science is extremely helpful for those considering a career in music production.
Audiotuts+ is a great site with tutorials ranging from beginner to advanced. It is a good place to get started.