A broker is a person or entity that acts as a mediator between the seller and the buyer. Brokers can perform both buying and selling functions, as well. They may therefore be considered principal parties in the transaction. This is different from the role an agent performs, because agents serve as representatives of either of the principal parties.
Brokerage firms are businesses which perform the functions of a broker, often for the purpose of stock trading.
There are different kinds of brokers, depending on the industry.

A stockbroker is one who handles transactions of shares and other securities. Since investors cannot enter the stock exchange and conduct transactions, it is necessary to employ the services of a broker.

If the broker is only tasked with following instructions on whether to buy or sell stocks, the service he performs is called execution-only. In other cases, the broker may give advice to the client. However, the client still makes the final decision on whether to buy or sell. This is called advisory dealing. If the broker is granted the right to make decisions independently, then the broker’s function is termed as discretionary dealing.

A mortgage broker, on the other hand, deals with mortgage loans. Mortgage brokers are in charge of compiling all legal documents, as well as reviewing the borrower’s situation and finding out what mortgage products would be best-suited to the client.