Some publishers offer advances to their authors, some do not. These can range from $30 – $20,000 depending on the author and if their agented or not.
So what are advances? Advances are based on the number of copies the publisher thinks the book might sell upon release. If it’s a potentially big book they’ll increase their marketing budget to help ensure that the sales are high.
An advance is a payment against royalties. If the publisher thinks your book will sell 10,000 copies they’ll work out how much that means in royalties, so that amount will be your advance. Then you’ll not receive any further payments until your book has sold those 10,000 copies, as you’ve already been paid for them.
If your book sells more copies you’ll start receiving royalty cheques: they’re usually paid twice a year by the bigger publishers who focus on print sales. Publishers who focus on ebook sales predominantly pay them more frequently, such as quarterly.
If your book sells fewer than those 10,000 copies you’ll not receive any royalty payments–but you won’t have to pay back any of your advance. Good, reputable publishers won’t require you to do this.