When you're first starting out as a writer advances and royalties can sound like another language. I've done a lot of research and finally have a bit of experience of my own regarding the subject. The answers are complicated, but I will do my best to simplify them for you.
It begins with an advance, and that is just what is sounds like, an advance on money you will hopefully make back for your publisher. This can be anywhere from a few thousand, to the impressive~yet now rare~six digits that you've heard about. If you have an agent they will get 15%~in most cases~of the advance. I know what you're thinking. Why even use an agent when there are many publishers you can submit to without one? Because an agent can make the difference between a $2,000 advance and a $20,000 advance. That 15% doesn't sound so bad now does it?
Earning out your advance and then earning royalties is the real goal. Most publishers are going to pay you 10% of the cover~or selling~price of a hardback and 8% of the price of a paperback. Ouch, I know but such is the traditional world. Ebooks are a different animal with sometimes a higher payout for the author for obvious reasons. First, enough of your novels have to sell to make the publisher the advance they paid you. Only after that will you start getting royalties.
I came across a brilliant blogger, Shawntelle Madison, who created a calculator to figure out royalties. Check it out here. She uses the 10% payout for hardbacks and 8% payout for paper backs. It appears that she has worked the agent percentage in there as well so it shows your net profits after that. With it you can get a good idea of how many books you have to sell to make a certain amount of money. Prepare yourself though, it takes a lot of sales to make much. If that calculator won't inspire you to work on your marketing, I don't know what will! Remember, this is for traditional publishing only, indie is a whole different matter.
~Heather