Mixing and Mastering
What's the difference and why are they so important?

Mixing and mastering are the two base components of professional record producing. A good mixing and mastering job is a must when you're recording a song or an album that you plan to sell. You might be able to get away without mastering if you're only recording a demo, but it can depend on what you want your demo to achieve. The better it sounds, the more likely it will help you reach your goal so you might want to invest the time and money necessary to have your track or album mixed and mastered professionally.
Mixing refers to the process of putting several layers of audio together to make one final track or to musically modify an existing track.
You're working with basically everything you recorded when you mix a song. You'll EQ and compress your tracks, add delay and reverb, balance the levels and explore panning. Think of mixing as putting together a jigsaw. You're combining the parts of what you've recorded, making sure everything sits well together, then you'll add some finishing touches.
It's extremely unlikely that excellent mastering can fix a bad mix. Watch out for the red flags that often indicate you are creating a bad mix in the first place. For a lot of musicians, mixing is where the real magic happens. It's when a composition goes from being a jungle of notes and words to becoming what you envisioned as the finished track.
Mixing
Tips for Optimal Mixing

You can hire a mixing engineer—something you might want to consider if you have the budget for it and no experience of your own—or you can attempt to mix your song or album yourself.
If you're going to attempt to mix the song or album yourself, be sure to use reference tracks. Pick a reference track that sounds like the song you're going to mix. For example, if your track is heart-thumping EDM, you would not necessarily want to reference Elton John. Listen to the balance of the mix. How loud is the kick drum in relation to the bass? Does the vocal sit in the mix or is it upfront? Is everything centre or panned left and right?
Experiment with EQ and compression. EQ cuts can eliminate frequencies that you don't want to hear. EQ boosts can emphasise the ones you do. Compression can heighten quiet spots and tone down louder ones. Smooth the tracks out using filters to eliminate excess or intrusive noises and sounds.
Your goal is to make sure that each voice and every instrument has its own space in the mix and can be heard. Grouping similar instruments can be helpful and speed up workflow. It can be helpful to use busses on each: one for guitars, one for vocals, and so on.
Don't over-compress your tracks.
Make the mix yours. Put your stamp on it. This might include adding plugins or other minor effects. It's up to you, what you want to achieve with the song or album, and the audience you want to reach.
Mastering
Optimising the Overall Sound

Think of mastering as adding sparkle and shine to your music. The term refers to the process of optimising each individual track by compressing, equalising and making stereo enhancements.
Mastering focuses on idiosyncrasies in each track with an eye and an ear toward their progression. It takes in all the tracks as a whole. For an album, you want the levels of the songs to be similar throughout and a general sense of cohesiveness to your recording. You want flow from start to finish.
Apart from correcting obvious differences in volume for each song, mastering is an incredibly subjective process. In some ways, musicians believe that you either have the golden touch or you don't when it comes to mastering.
Although some programs help you master your recording yourself, paying to have it done professionally is a good investment if you plan on releasing your recording to the public.
Conclusion
Mixing and Mastering
Both mixing and mastering can only achieve so much. It is paramount that the production is as good as it possibly can be before you have it mixed. Don't approach your production with the mindset of fixing everything at the end in the mixing stage. Fix it now. If it doesn't work, take it out. Get the production right and the mixing and mastering should take care of itself.