As I’ve discussed before, a book is said to have earned out when the amount of royalties due exceeds the amount of the advance paid.
Most books—perhaps 70%—don’t earn out and it’s often assumed that they therefore don’t earn a profit for the publishers. This isn’t necessarily the case.
The amount of advance paid is based loosely around the number of copies the publisher expects the book to sell: higher projected sales usually equals a higher advance (and a correspondingly higher promotional budget). When a book earns out, that projected number has been exceeded: from this point on, its writer will receive royalty cheques for every sale made.
However, publishers are business-people, and so are naturally cautious where money is concerned. Before an offer is made they work up a profit-and-loss projection on the book to make sure that they can afford to take it on: and you can guarantee that they’ll be in profit on most of the books that they publish a good way before they earn out.