Who Pays the Real Estate Commission and Closing Costs: The Homebuyer or Seller?

Do you know how much an average real estate agent commission is? Or who pays real estate agent fees and closing costs?
Though most homebuyers and sellers might not be able to tell you what these fees are, they’re fairly critical to the real estate agent working for you. These fees are how most real estate agents are paid.
So in real estate, who is responsible for paying commissions and fees: the homebuyer or the home seller? How much, on average, should you expect it to cost, and what other fees are you responsible for when you buy or sell a house?