Aspiring authors are often surprised to find that selling a book isn't the end of the process. It's only the beginning of the journey. What happens next? Here's a rundown of the life cycle of a book and what it takes -- and what you may have to do -- to get it ready for publication.
An editor buying a book doesn't mean the editor thinks it's perfect. It just means the editor can see commercial potential in it. The editor may expect you to revise it -- sometimes to the point you wonder what she saw in it to buy it because she clearly hates it and doesn't understand it at all. But just think about what she must have thought about all the books she didn't buy. I've gone through anywhere from no revisions at all to four rounds of revisions. At this point, the editor will ask you to clarify your worldbuilding, tighten up the plot, expand scenes that seem too cursory or that need "telling" turned into "showing," fix continuity issues, cut or combine scenes, or anything else that needs to be done to make the book better. There may also be line editing -- fixing the flow of words, cutting out "pet" words that get overused, and anything else that makes the words work. I generally suggest making a different file for each round because I've had editors change their minds and want to restore something I cut, or they start editing their edits, and it's good to be able to go back to a previous version and copy and paste.
After the editor is satisfied with the book, it gets turned over to a copyeditor, who is essentially a professional nitpicker. The copyeditor will check grammar, spelling and punctuation (anything the editor didn't find). The copyeditor also follows continuity -- making sure the characters' names are spelled the same throughout, making sure descriptions are consistent, making sure the timeline works. You may get questions like "She was wearing a hat at the beginning of this scene. Is she still wearing the hat, or did she remove it?" Or, if you have the copyeditor I work with most often, who has declared herself the Official Jewish Mother of my books, "How long has it been since they've eaten? I'm worried about them." One of the copyeditor's jobs is to conform the manuscript to house style. Often, there are multiple spellings, grammar usage or punctuation, but each publisher has its own version of what to use, so while you may be technically correct, the copyeditor will adjust it to the way that publisher does it. One of the big areas of house style is when to use two separate words, when to use a hyphen and when two words should be smooshed together. The copyeditor will also insert typesetting codes for things like italics or special characters at the beginning of a chapter. You get to go over these and quibble with any that you think change your story or are otherwise incorrect. This is also your last real chance to make any changes.
I haven't worked with electronic copy edits for a traditional publisher, where you would have the electronic file of the copyedited manuscript, but if you get paper copyedits, I would recommend inserting the edits into your file so you'll have a clean version of the final manuscript. That will come in handy when you need an excerpt for your web site, when you want to do a reading and need bigger type, when a foreign publisher wants an electronic file or when the rights revert to you and you want to self-publish it as an e-book. I would also recommend doing these changes in tracking mode or otherwise highlighting them in some way, and highlighting anything coded that doesn't need to be changed. That's for the next stage.
Page proofs or galleys
After the copyedits are incorporated into the manuscript, it goes into typesetting, and then you'll get a copy (either hard copy or PDF) of what the interior of the book will actually look like. You get to review this for one last check. You don't generally get to do any significant rewriting at this point -- I had one contract that stated authors would be charged for a certain number of changes that weren't the publisher's errors. Mostly, this is to make sure nothing got screwed up when the copyedit changes were made. That's why I recommend having a copy of the copyedited version with the changes highlighted. That way, it's easy to find the things you need to be looking for because that's where the errors tend to pop up. Even professionals have the occasional slip of a mouse finger and end up highlighting a whole paragraph to delete instead of just a line (I've had it happen). Make sure the right words are italicized and that the words on either side are intact.
But there may sometimes need to be other changes made at this point. I once had a book where they used a different spelling of a character's name on the cover, and they'd already printed the cover flats before I saw them. So I had to go through at the line edit stage and change every mention of the character's name to match the cover. I've also known of writers who had to make changes at this stage when world events significantly altered things and it was supposed to be a contemporary novel. If your setting suddenly no longer exists or if something has suddenly become a lot more sensitive, you may need to do a little last-chance rewriting.
Along the way, you may also be asked for input on the cover, approval or suggestions on the cover copy (but not always -- hence the name issue), and a bio or approval of a bio. Otherwise, you're done with the content of the book.
And, usually, all this stuff is happening while you're trying to write the next book.