Yes, I've had people ask me that question, especially by aspiring writers. Some authors make a lot of money, even enough to live on--they are the ones whose names you recognize. Sadly, I'm not in that category.
I am with two publishers that I really like--both do more for me than any publishers I've had before. Yes, I get royalties--and I know exactly how my books were purchased. The royalty statements show whether the sale was made from the publisher's site, a book store, or for Kindle, Nook or some other e-reader.
What happens though is the customer pays whatever the price is--if it was purchased through anything but the publisher's website, the first one to get a cut is the person who sold it--bookstore, Amazon, Barnes and Noble etc. For a paperbook, Ingram also gets a portion. The publisher gets their share whatever percentage that might be--and who gets the last little bit? Yep, that's me.
This is the main reason so many authors are self-publishing. The drawback to this is if you really want the book to look professional you'll probably have to pay someone to design the cover, back and front, get the ISBN number, do the layout correctly, and make sure it gets into all the proper places to be purchased. Oh, and the promotion is all up to you.
Promotion is really up to you no matter how you publish--unless you're one of the recognizable names I mentioned in the first paragraph.
Some authors are going the exclusive Kindle route and many have made quite a bit of money. I have one book I've done that way, The Devils Foothold, and as of this writing, nothing much has happened with it though I have done a lot of promotion. Not as much as I should though, because I'm busy with other writing projects.
That brings me around to if I'm not making much money why do I keep writing?
The answer is simple. I love writing. I love the process of creating a story and the characters. Because I don't do a complete outline, though I do know where I'm going, I want to know what's going to happen next.
I also enjoy promotion even though it takes a lot of time. I love all the readers and other authors I've met along the way. It's been a thrilling adventure--one I can't measure in dollars.
Sure, it would be great if I did make enough money to pay the bills, but whether that happens or not, I'll keep on writing as long as I'm able to sit at my computer and hit the right keys.
Marilyn aka F. M. Meredith