What an editor will do when they receive your manuscript depends in part upon the type of edits requested/required. The basic definitions of the three possibilities are set out below.
This is where a manuscript needs major edits, including a review of the structure and pacing of the story.
Standard copy-editing focuses on content, grammar, punctuation and formatting. This is for works that require a solid review but no major structural changes.
Standard proofreading checks for spelling, punctuation, grammar and formatting. This is a final review on a document that should, in all other respects, be ready for publication.
These days, most editors will work with your document in Word, using Track Changes. They will mark up the text with any spelling and grammar fixes, and they will add comments if they find something in the plot that doesn't work or that needs further clarification. The editor's job is not to rewrite your story but to suggest changes to tighten your prose while maintaining your author voice. If you see a lot of red, don't despair. Think of it as a learning opportunity. The more you write and hone your craft, the easier edits should become.
The editor is not there to reprimand you or make you feel bad. They are your friend. They want to help you make your story the best that it can be. And at the end of the day, their suggested changes are just that—suggestions. The story remains yours and if you vehemently disagree with an editor's suggestion on a book you plan to self-publish, you can ignore their advice. Though, do bear in mind that they will have proposed the change for a reason, so consider carefully before you make your final decision. When working with an editor from a publishing house, you may not have quite the freedom to reject everything you don't like. However, good editors and publishing houses will work with you to find a compromise that suits both parties.
I will expand on this topic further in a video later this month, so keep an eye out for that both here and on YouTube.