NOT in Canada, but in USA
Agent:
Generally, a term referring to a person who is licensed to sell real estate. In the USA, each state issues licenses and the qualifications for licenses vary greatly.
In some places, there are several kinds of 'agency'. A seller's agent legally represents the seller and must work in their best interest. A buyer's agent represents the buyer and must work to that person's best interest. The seller pays a percentage of the selling cost of the property to the selling agent who splits it with the buyer's agent. Buyer's usually do not pay their agent a fee.
There are other kinds of 'agency', but that varies state to state.
I suspect that there is no national policy in Canada, either.
Broker:
The person who holds the licenses of those who sell real estate. This person is ultimately responsible for the real estate agent's actions, especially if there is a problem. So, if you were talking about the 25 person ABC Real Estate Company, the broker is the owner of the company, the sales people are the agents. For many activities, you must be licensed, which is why if you call an agency and the receptionist at the front desk won't answer your questions about a property, it's because that person would break the law if she did.
Realtor:
A member of a professional organization (The National Association of Realtors, The Minnesota Association of Realtors, etc.) 'Realtor' is a trademarked name. Realtors have a code of ethics a rules they have to follow. The Association also lobbies for or against laws.
The post above mentions a 'broker' as the person who shops around for a mortgage. That is a 'mortgage broker', not a real estate broker. They can work together, but are not the same thing.
Hope this helps.