Today, the listing agent represents the seller, and the buyer's agent represents the buyer.
Sellers still pay the commission but it is paid to the brokerage of the listing agent.
That brokerage in turn pays half of the received commission to the brokerage of the Buyer's agent. The individual agent is then paid on whatever level has been agreed upon in their office contract. Agents can elect to represent either seller or buyer, or both if the situation arises wherein the listing is one that is listed by the buyer's agent's office. That's called a dual representation. In such a case, the agent pledges fairness and honesty.