"Dear Mr. Barer: what is an editor, what do they do, and do I need one?"
If you pour steel for a living, an editor is not imperative. If you pour out hyperbolic pararaphs and run on sentences with wild abandon, digressing into sociological subtexts that outdistance Dennis Miller, and unintentionally overlook essentials such as "who, what, when and where," you need an editor.
I received my editorial baptism by fire on my first book, THE SAINT: A Complete History. Steve Wilson is a brilliant insightful editor who told me what to expand, what to contract, what needed more detail and why, what needed less emphasis and why. He pushed me to give the best work I could give the publisher and the reader. The reward was an Edgar Award, consistent sales, and a quality product all the way around.
While some authors chafe at their editor's comments, I love working with an editor. She or he will see things that I don't see; ask for things that didn't occur to me, or even remove things on which I spent a lot of time, but just didn't move the story forward.
My Pinnacle True Crime books had the same editor for the first two in the series, and we became very adept at working together. She left 3/4 of the way into BODY COUNT and that rather threw both the publisher and me into a bit of chaos, but it all came out allright. If you're lucky, you will gradually develop a relationship with your editor that, as with all successfull relationships, is based on trust and respect. Soon, you can almost anticipate each other's approach...and I would ask myself "what will (editor) think of this?"
When writing media tie ins such as The Saint novel for Paramount, Maverick for Warner Bros. or Stealth for Sony Entertainment in Japan, there are many other editorial considerations because the "world" you are writing about, and the characters in that world are not "yours." You didn't create them, they were created by someone else. You must be creative in translating a screenplay into a novel, or adaptation of another form, but remain loyal to the source material.
I love writing, writers, but most of all, readers. My personal motto is this: A book isn't a book until someone reads it. I write for you, I write to you. Hence, I love hearing back from you.