It could be almost anything depending on the method of publishing and whether they signed with a publishing house.
Hardcover books automatically cost about $10 to print, which is why they're more expensive. Paperbacks cost about half that. Ebooks on Kindle cost nothing to reproduce, but if you do charge money then they take a commission.
It also matters where the book was sold at. Did someone find it sitting on a shelf at Barnes and Noble? Did they order it from an online retailer like Amazon? Did they order/download directly from the publisher's homepage? The more middlemen involved, the more people to take their cut.
Finally, the author's agreement with the publisher can vary. If they went with a large publishing company, they will sell more copies because the book gets promoted a lot, but the trade-off is, that company takes most of the money. They'll give you an advance of a few thousand, but then they have to get paid back all of their investment before they give you any more. Writers who go with a large publisher can get stuck earning as little as 50 cents per copy. Sometimes it can be as high as a dollar or two, but no more than that until you become Stephen King. So unless your book sells more than 10,000 copies, you will never see a penny after that initial advance. The average fiction novel from a first time author sells between 7,000 - 10,000.
Smaller publishers don't get the book "out there" as much, but they are more generous with sharing the profit. If the author chooses to publish themselves, they get all the profit, but that's still after the retailer takes a cut.
So if you're talking about $10 for an ebook from a self-published author, they'll get around $6 of profit. If you're talking about $10 for something at the bookstore put out by Random House, the author is crossing their fingers in the hope they'll get another royalty check one day.