In general, the publishers sell at a discount rate of about 50%. So B&N pays $12.50 for a 25.00 hardcover. Sometimes the discount is higher - but in those cases they'll give the book special placement (like a table at the front of the store). This is what's know an "co-op fees" another way to pay co-op fees is to pay a extra 's rather than a higher discount.
Most self-published books aren’t in bookstores. Many reasons for this - most notably they have too many books from big publishers that they can’t fit. But also because most self-published authors use Print-on-Demand which means the books are printed as they are ordered. This type of printing requires the books to be paid before shipped, and bookstores don’t buy books “up front” they sell them on consignment which means the publihsers give them xx books - and after yy time the ones that haven’t sold can be returned “for credit.”
Bookstore shelving is PREMIUM space. Think of it as movies released in theaters vs those that go “direct to CD.” If a book doesn’t sell well, or is from an author that hasn’t sold well in the past, or the bookstore doesn’t think will sell well, it gets no in-store shelf space.