There are many different layers to editing a book well.
First there’s the overall structure of the book. Does it work in its current form? Would the book flow better if scenes were rearranged or deleted, or if new scenes were added?
Then there’s the content. Are all those scenes complete? Are there any plot-holes which need filling, or characters which need a little more flesh on their literary bones? Or descriptions which are just a little too lush, and could do with a bit of trimming? Is the tense and point of view consistent throughout, and appropriate for the story? Line-editing aims to get all of this right and is an intense and important process.
Once the structure and contents are taken care of, the focus moves to copyediting—checking the smaller details. Are the grammar, spelling and punctuation correct and consistent throughout the book? Are there any potentially libellous statements which will need to be checked by a lawyer, or removed entirely? And have all facts been checked for veracity? Often this work will be handed over to a copy editor; a fresh view of the book is always useful and usually leads to more errors being discovered and corrected.
Once all of the copy editor’s comments have been incorporated into the book, the designer will flow the text into the layout that has been agreed on and the editor will take another look through, to check that the headings are all in the right places and that no widows or orphans have been created (which are stray lines at the beginning or end of each page); and once all of that has been done a set of page proofs will go to the writer and, ideally, to a proof-reader for final corrections before the book finally goes to print.
Alongside all of that, editors drive their books through the process of publication, dealing with design, publicity and marketing, and production along the way. It’s a complex job. No wonder they sometimes fall behind with their slush-piles.