Writers usually receive a certain percentage of each sale of a book—that’s called royalties. Make sure your contract specifies whether your royalties are calculated based on gross or net sales. Gross is the full cover price, what the customer actually pays for the book; net is what the publisher actually receives (for example, less the bookstore’s percentage).
10% of the cover price is typically a standard royalty for print books. For ebooks, the “standard” is still in development, but about 25-50% is currently within normal range.