The agent receiving the referral agrees up front, with the referring agent, as to how they will share in any compensation they receive should you sell or purchase a property with the receiving agent. This is a contractual agreement strictly between the agents (and their brokerages) to which you are not a party, and it does not affect you or cost you anything.
At the very beginning of the referral process, the agents discuss the referral in detail, negotiate and agree to the fee (effectively co-authoring the agreement), and together the agents and their brokerages memorialize the details of whatever the referral percentage is that will be shared. If for any reason an agent does not want to do the referral work offered and discussed, they simply take a pass.
The referral agreement must be approved, with signature, by their respective brokerages. The fee is percentage-based. As an example, the agent sending the referral might receive around 25% of whatever commission is ultimately paid to the agent receiving the referral, but this percentage can be considerably lower or higher, depending on many factors including unique relationships or unique circumstances.
Again, all terms are discussed and agreed upon up front between the agents/brokerages, and it is an agreement only between them; it does not involve you. The intent is that this agreement between the agents does not affect you financially but only serves to benefit you with the service you receive. This is the philosophical basis of referral, and it is the standard, common practice in the real estate profession.
The referral business is business the receiving agent likely never would have had without the referring agent, so they are grateful. They see your business as excellent business they were given. They understand the good fortune and value, and they enjoy the financial benefit of the referral as they work in service to you.
As a result, no agent receiving a referral should ever even consider changing their commission fee to a client or customer because of the referral fee the receiving agent has already agreed to pay to the agent who referred them the business. (In fact, it would be considered poor form for the receiving agent ever to mention to you, the client, any referral fee negotiated between the agents when discussing their compensation/commission with you.)
You can relax and know that the receiving agent is focused on doing their best work for you, and their agreement with the referring agent is of no consequence or concern for you. You can expect to receive the agent's best service and attention, period.
Fundamentally, the agents are making the following agreement up front: “Whatever commission is paid to the receiving agent in the transaction(s) shall be shared in the manner the agents agreed upon when the agents formalized their referral agreement and the client's excellent business was given to the receiving agent. The client does not pay extra; the client benefits, period.”
This is understood as the ethical and philosophical foundation of any referral agreement.