Professional editing is the craft of preparing a writer's 'raw' text for publication; that is to say, once in its printed form, the text is clear, concise, and coherent to the reader.
It goes without saying that printed matter should have the correct spelling, punctuation, and grammar; also part of the editor's remit.
It is not possible for a writer to edit their manuscript in the same way a professional editor would. There are two reasons for this:
A good professional editor has a skill set that enables them to turn a manuscript into a published book. An editor is not a middle man, and should never be cut out if the writer wants to sucessfully publish their work; they are an important part of the publishing process.