Editing is going through your tracks, making sure they're perfect. Taking bits out, putting more bits in, etc. The same as editing a film.

Mixing is when all the instruments / sources are combined and "mixed" into just one or two channels.

Mastering is when all the channels are "mastered" into their final form, like on a vinyl or cd.
Editing is basically prep work for mixing, for example, if your snare is off time from a click track or something, you would be moving the snare hits to match up with the beat, it could also include things like layering tracks

Mixing is like you are painting a picture, your moving instruments around, adjusting levels, panning, putting effects such as reverb, delay, compression, equalization etc... it's an art form really to be decent at mixing.

Mastering is the last process that would get a song ready for final release. It really just involves things like minor EQ, compression, and limiting on the master fader, it's very subtle changes and it takes a good ear to know how to do properly
no dice.