You generally have three options when trying to decide how to sell your textbooks. Sell online, locally, or directly to other people who need them. Here is an in-depth guide that explains how to sell your books and get the highest price, using any of the three options.
This is perhaps the most lucrative option because you can just sell to the highest bidder. A handful of companies will give you an offer, ship your book(s) for free, and pay you through PayPal (Some will send you a check in the mail.) But you'll need to compare offers from all these companies - just enter an ISBN below. Offers are based on inventory, and can vary significantly between book companies ($50 or more sometimes).
If you have multiple books, just ship them out to those companies that offer the highest bid.
If you are student, this is really easy - just take your books to the campus bookstore. But, depending on inventory, you may get good offers or bad offers. Sometimes there are off-campus bookstores that you can try. If you're going to do this, go as soon as you can after finals. Once other people start selling their books, inventory goes up, and buyback offers go down.
It's easy to sell to your friends in your major who are taking your current class next semester. Some schools have book swap platforms where you can sell directly to other students. You can also search for your school and post them for sale.
Another option is selling them used on Amazon. This is common practice, and many people do it - it just bypasses the middlemen (book companies). So you might make a little more money this way, but it takes a lot more work than the other options - you have to create a seller account, create a listing, take pictures, etc.
With a little work, it is super easy to maximize the amount of money you get back when selling your textbooks.