There are a few different ways that traditionally published authors get paid. The most common way is through royalties. This is where the author gets a percentage of the cover price of each book sold. The amount of the royalty varies depending on the publisher, but is typically around 10%.
Another way that authors can get paid is through advances. This is where the author is given a lump sum of money upfront, against future royalties. The amount of the advance varies depending on the publisher, the type of book, and the author's track record.
Finally, some authors also get paid for speaking engagements, book tour appearances, consulting work, etc. This is generally on top of any royalties or advances they receive.