Buying and Selling Stock
When you call your broker to buy or sell a stock - or hit "enter" when placing an order through your online brokerage account - that's only the beginning of the transaction. Your broker's firm must then send your order to a market center to be executed. This process of filling your order is known as "trade execution."
Your broker generally has a choice of markets to execute your trade:
An exchange is a marketplace where traders can buy or sell stocks and bonds. For a stock that's listed on an exchange, your broker may direct the order to that exchange, to another exchange, or to a firm called a "market maker."
A "market maker" is a firm that stands ready to buy or sell a stock at publicly quoted prices. As a way to attract orders from brokers, some market makers will pay your broker for routing your order to them. This is called "payment for order flow." For a stock that trades in an over-the-counter (OTC) market, your broker may send the order to an "OTC market maker." Many OTC market makers also pay brokers for order flow.
Electronic Communications Network (ECN)
Your broker may route your order to an electronic communications network (ECN). An ECN is an electronic trading system that automatically matches buy and sell orders at specified prices.
Your broker may route your order to another division of your broker's firm to be filled out of the firm's own inventory. This is called "internalization." In this way, your broker's firm may make money on the "spread" - which is the difference between the price the firm paid for the security and the price at which the firm sells it to you.
To learn more about the basics of trade execution - including order routing, payment-for-order-flow, and internalization - you should read Trade Execution: What Every Investor Should Know.