The listing company has an agreement with a seller for a certain amount of total commission to be paid to the listing company if, and only if, the house sells. That listing company then enters the listing into the local MLS system and offers a set commission to any company that brings a buyer. Normally it is 1/2 of the total commission they get from the seller, but it does not have to be. It can be more or less than 1/2. When the homes sells and closes the commission is subtracted from the proceeds the seller gets and goes to the listing company and the selling company based on the split agreed to in the MLS listing. Each of those companies now splits their received commission with the agent that works for them with some agreed amount from half up to 90% or more.