What is “mortgage broker commission structure” (simplified)?

What is “mortgage broker commission structure” (simplified)?

Mortgage brokers typically earn two types of commission: an upfront commission (a percentage of the loan amount) paid by the lender upon settlement, and a trail commission (a smaller ongoing percentage) paid by the lender for the life of the loan, provided the loan remains active.