first of all, they're both two different things. however, they're both as important as each other if you want a song to be finished correctly. mixing mainly involves the volume adjustment of each individual track within a song: bass, kick, snare, vocals etc.
mastering mainly consists of the final adjustments of levels and frequencies within the final mix: low end/hi end frequencies. sometimes a certain frequency within in a song may need boosting or reducing e.g. bass frequency is a touch too low and needs to be brightned up or even boosted, or the kick needs to be softened slightly becuase it stands out too much; thats where an equalizer would come into play again. as well the final volume of the track is handled in the mastering process, it is brougth up or down to the correct level for audio cd's or records.
like Nnxt's point: having a good mix of the track volumes, makes less work of mastering it.
i doubt however that you could have one without the other, no matter how good your original mix is. you'd always need to have your tracks mastered if they were to be professionally released.
if i'm wrong or off point about either of these two things, and someone has a better understanding of either, please correct me.
cheers