There are three different types of editing, from the macro to the micro.
There is no set order for these and they can be done at anytime and often can be visited more than once through the process of your writing.
1. Macro edits
Rewriting and changing the plot in major ways, adding or changing characters and character arcs, changing setting, basically anything that requires a major change to the text.
2. Line edits
Checking for fact accuracy, repetition, duplicated sentences or paragraphs or even chapters!
3. Copy edits
Fine tuning the edit for punctuation, grammar and spelling.