In my humanities field (history) I've heard that hardcover books from university presses yield virtually nothing in royalties (on the order of a couple hundred dollars) but that if a book is reprinted as a paperback aimed at undergraduate courses, it can be an order of magnitude more. I've also heard that textbooks are the only scholarly publishing outlet that actually makes healthy royalties - i.e. letting you pay a down payment on a house as opposed to paying for a couple nice dinners out. In terms of hours spent (in the thousands) to money earned (in the hundreds of dollars), writing a typical university press hardcover has got to be one of the lowest-paying professional activities in existence.
As for non-fiction popular press books, I've been told that a typical advance can range from less than 10k to around 50k-60k - the idea being that this money will sustain the author for the 6 months to a year or so it takes to finish the manuscript. (Would that this were feasible for academic books!)