Mortgage brokers are usually paid a commission by the lender after your loan settles.
The commission is disclosed to you as part of the loan process, so you can see how the broker is paid. A broker should also explain why a lender and loan product has been recommended, including how it suits your needs and objectives.