There are different kinds of editors, and all of them help to create a successful book.
Early in the project, you might need an editor to develop and sharpen the idea, and make sure the approach suits the intended audience.
Then comes the substantive or structural editor who makes sure the book is in overall good shape. This means that the idea is clear and well developed, and the book is hitting the target audience. A structural editor will also make sure that the chapters are lining up well, and that each chapter is in good shape. Does the author make the central point in a clear and coherent way? Or is the author wandering into irrelevant territory or dwelling too long on a point that isn't that important. Does the author have the evidence to support the argument? Are the anecdotes in place to win over the reader? A traditional publishing house will pay for this structural edit, but structural editors generally do not write the book for you. Even if you get a book deal at a big publishing house, you may need to pay a ghostwriter to do the actual writing.
Once the book hits production, you will go through the next round of editing. A line editor deals with stylistic issues, while a copy editor deals with the fine points of grammar and syntax and consistency etc. A traditional publishing house will pay for this.
If you are self-publishing, you will need both a structural editor and a line or copy editor if you want your book to rise to the pro level.
At Barlow Books, we work with all of these fine editors, and each one contributes in a big way to the quality of the book.