Skip to content
Finance Lessons

Stock Markets & Funds

How the Stock Market Actually Works

The market's plumbing explained: what an exchange really does, why buying Apple sends the company nothing, how zero-commission brokers actually get paid, and the market makers, clearinghouses and regulators working backstage every time you tap 'buy'.

14 min Updated Jun 10, 2026

You tap “buy” on your phone, a number changes, and you now own a sliver of Apple. The whole thing takes about as long as a sneeze. Behind that sneeze sits one of the most elaborate pieces of machinery humans have ever built: exchanges matching millions of orders a second, brokers shuttling your request around, market makers quoting prices around the clock, a clearinghouse quietly guaranteeing that nobody runs off with the goods, and a regulator watching everyone. This lesson opens the wall panel and shows you the plumbing — who all these characters are, what each one actually does, and (the question almost everyone gets wrong) where your money actually goes.

Before you read — take a guess

Guess before reading. You buy one share of Apple through your trading app. Where does your money actually go?

Info:

A quick callback to investing basics

You already know what a stock is — a tiny ownership slice of a company — and that buyers and sellers somehow agree on its price. This course is about the how: the machinery that turns “I’d like to own some Apple” into shares actually sitting in your account. And from the economics course you know prices emerge where supply meets demand — the stock exchange is simply the most industrialised version of that tug-of-war ever built.

The exchange — an extremely organized marketplace

Analogy. Imagine trying to sell a guitar two ways. Option one: a garage sale. You drag it onto the lawn, wait for a stranger to wander by, haggle for twenty minutes, and accept whatever they offer because who knows when the next buyer shows up. Option two: a giant, permanent guitar bazaar where thousands of buyers and sellers show up every day, every recent sale price is posted on a board, and a referee enforces the rules. Same guitar — but in the bazaar you sell it in seconds, at a fair price, with no haggling. A stock exchange is the bazaar, industrialised.

Definition. A stock exchange is a regulated marketplace whose one job is matching buyers with sellers of shares. It doesn’t own the shares, doesn’t set the prices, and doesn’t care whether prices go up or down — it just runs the matching engine, publishes every price, and enforces the rules of the game. The two giants in the United States:

ExchangeFoundedPersonalityFamous tenants
NYSE (New York Stock Exchange)1792, under a buttonwood treeThe old-money one — a literal building on Wall Street, opening bell, people in jacketsCoca-Cola, JPMorgan, Berkshire Hathaway
Nasdaq1971The all-electronic upstart — no trading floor, just serversApple, Microsoft, Nvidia, Amazon

Despite the different vibes, both do the same job: continuous, electronic order matching. (The NYSE floor you see on TV is mostly ceremonial these days — the heavy lifting happens in data centers in New Jersey.)

Trading hours. US exchanges run a regular session from 9:30 a.m. to 4:00 p.m. Eastern time, Monday to Friday, minus holidays. There’s thinner “pre-market” and “after-hours” trading around the edges, but with fewer participants the prices there get jumpier — the bazaar at 7 a.m. has three sleepy vendors and wide-open haggling room.

Why exchanges exist at all. Three gifts you’d badly miss without them:

  • Liquidity — the ability to buy or sell quickly without moving the price much. Because thousands of counterparties are always present, you can sell $10,000 of Apple in under a second. Try selling $10,000 of your neighbour’s pottery collection in under a second.
  • Price discovery — every trade is public, so at any moment there is one well-known market price, distilled from everyone’s buying and selling. No price discovery means every trade is a garage-sale negotiation from scratch.
  • Rules and trust — listed companies must publish audited financials, trading is surveilled for manipulation, and everyone trades under the same rulebook. You can buy from a total stranger precisely because neither of you has to trust the other.

Misconception. “The exchange sets stock prices.” Nope. Prices come from the orders that buyers and sellers submit — the exchange is the referee and scoreboard, never a player. If a stock crashes, the exchange didn’t do it; the crowd did.

When it matters. Every order you ever place routes (directly or indirectly) to an exchange or a venue competing with one. Liquidity is also why “just sell it” works for stocks but not for houses, art, or your stamp collection — remember that contrast when you meet illiquid assets later in this course.

Which of these are real services an exchange provides? Select all that apply.

Primary vs secondary market — why Apple never sees your money

Analogy. Buying a share of Apple on the stock market is like buying a used car. When Toyota sells a brand-new car off the lot, Toyota gets the money. When you later sell that car to your cousin, Toyota gets nothing — the car just changes hands and the cash flows between the two of you. Toyota doesn’t even need to know it happened.

Definition. The primary market is where companies sell newly created shares to investors and receive the money — most famously in an IPO (initial public offering), the company’s stock-market debut. The secondary market is everything after: investors trading those existing shares among themselves, with the company entirely out of the loop. The exchange you met above? That’s the secondary market’s home turf. It’s where essentially all of your investing life will happen.

Worked example — follow the money in both markets

Primary market (the IPO). In 2021, the trading app Robinhood went public. It created and sold roughly 55 million brand-new shares at $38 each:

  • 55,000,000 shares × $38 = about $2.1 billion
  • That cash (minus hefty investment-banking fees) went into Robinhood’s bank account — money to hire, build, expand. That’s the primary market doing its actual job: funding companies.

Secondary market (every day since). Today you buy 10 shares of that same company at, say, $25 through your broker:

  • You pay 10 × $25 = $250
  • That $250 goes to some other investor who decided to sell 10 shares at that moment.
  • The company receives: $0.00. It isn’t a party to the trade. It may notice its share price moved; it does not get a cheque.

Misconception. “Buying stock supports the company financially.” On the secondary market, it doesn’t — not directly. You’re buying from another investor, full stop. (Indirectly, a healthy share price does help the company: it can issue new shares at better prices, pay employees in valuable stock, and borrow more cheaply. But your $250 itself lands in a stranger’s account.)

When it matters. This distinction explains why markets exist at all: nobody would buy shares in the primary market (locking up money for years) if the secondary market didn’t promise an easy exit. Liquidity downstream makes fundraising upstream possible. It also explains headlines: “Apple’s stock fell 3%” means investors repriced existing shares among themselves — not that Apple lost a single dollar of cash that day.

Think first

Think first: if the company gets nothing when you buy its shares, why does its management obsess over the stock price anyway? Come up with at least two reasons, then reveal.

Hint: Think about what a company can DO with highly valued shares — and how executives are paid.

Brokers — your bouncer-approved ticket into the club

Analogy. The exchange is an exclusive club with a strict door policy: members only. You, a regular human with a phone, are not a member — and the bouncer is not moved by your enthusiasm. A broker is a member who goes in on your behalf: you tell them what you want, they execute inside, and they keep your purchases safe in the cloakroom afterwards.

Definition. A broker (today usually a brokerage app or website) is a licensed firm that takes your orders to the market, executes them, holds your cash and shares in custody, and handles the blizzard of paperwork — trade confirmations, tax forms, dividend collection — that you never see. Only exchange members, firms that pay for membership and meet capital and conduct requirements, may trade on an exchange directly. That’s not snobbery: it means every order entering the matching engine comes from a vetted, capitalised, accountable firm. Your broker is your licensed gateway.

Commission vs “free” — how zero-commission brokers actually eat

A commission is a per-trade fee. Old-school brokers charged $5–$50 per trade; around 2019, major US brokers cut commissions to zero. But brokerages have offices, lawyers, and shareholders — so where’s the money? Three main kitchens:

Revenue streamHow it worksCost to you
Payment for order flow (PFOF)The broker routes your orders to a market maker, which pays the broker for the privilege of trading against themIndirect — possibly a slightly worse execution price than the absolute best available
Margin lendingThe broker lends you money to buy stocks, charging interestDirect interest — only if you borrow
Cash sweepYour idle cash earns the broker a healthy rate at the bank; you get a sliver (or nothing) of itThe yield gap between what your cash earns them and what they pass to you

Worked example. Suppose you keep $5,000 of uninvested cash at a zero-commission broker. The broker sweeps it into a bank program earning, say, 4% — about $200 a year — and pays you 0.5%, about $25. The other $175 a year is broker revenue, earned from “free” you. Multiply by millions of customers, add PFOF pennies on billions of orders, and “free” turns out to be a perfectly good business.

A note on PFOF geography. Payment for order flow is legal in the United States (the SEC requires brokers to seek the best reasonably available price regardless). The European Union decided it smelled like a conflict of interest and banned it, with member states phasing it out by 2026. Same plumbing, different regulators, different verdicts.

Custody and “street name” — where your shares actually live

When you buy shares through a broker, you usually won’t be listed in the company’s shareholder register by name. Your shares are held in street name: registered to your broker (technically, to a central depository above it), with the broker’s internal books recording that you are the real (beneficial) owner. It sounds alarming and is actually what makes modern markets work — shares can change hands with a database update instead of mailing paper certificates around. You keep all the economic rights: dividends, voting, the gains. And brokerage customers are protected (in the US, SIPC insurance covers up to $500,000 in securities if the broker itself fails — though it never covers your investments simply losing value).

Misconception. “Zero commission means trading costs me nothing.” Trading always costs something — the cost just moved from a visible line item to invisible plumbing: execution quality, cash yield gaps, and the interest on margin. Usually small for everyday investors, but never zero.

When it matters. Choosing a broker is mostly about which hidden costs you’ll pay: an investor sitting on lots of cash should care about sweep rates; a frequent trader should care about execution quality; nobody should confuse “free” with “charity.”

Spot the trap. A friend says: 'My broker charges zero commission, so they make no money from me — I checked, I've never paid them a fee.' What's the flaw in that reasoning?

Market makers — the dealers who never close

Analogy. A currency exchange booth at the airport will always trade with you, in either direction, right now — buying euros a bit cheap and selling them a bit dear. The booth doesn’t bet on currencies; it earns the small, reliable gap between its two prices, thousands of times a day.

Definition. A market maker is a firm that continuously posts two prices on a stock: a bid (the price at which it will buy from you) and an ask (the price at which it will sell to you), standing ready to trade either way all day. The gap between them is the spread — the market maker’s compensation for always showing up.

Worked example. A market maker quotes a stock at bid $49.98 / ask $50.02 — a 4-cent spread. A seller arrives and gets $49.98; moments later a buyer arrives and pays $50.02. The market maker pocketed $0.04 per share for standing in the middle. Four cents sounds laughable until you do it a few million times a day.

Why tolerate these middlemen? Because without someone obligated to quote, you’d only trade when another investor happened to want the exact opposite of you at the exact same moment. Market makers are why “I want to sell now” always has an answer. They’re also the firms paying brokers for order flow — your app’s orders are the steady, harmless retail traffic they love trading against.

Misconception. “Market makers profit by betting your stock will fall.” No — they’re spread collectors, not direction bettors, and they work hard to hold as little inventory as possible. The booth doesn’t care if the euro rises; it cares that people keep walking up.

When it matters. The spread is a real (tiny) cost on every trade you make, and it widens when markets get scared. We’ll keep it light here — a later lesson dissects bids, asks, and spreads properly.

Clearing and settlement — the unglamorous part that prevents chaos

Analogy. You “bought” a sofa from a stranger online. Now comes the awkward part: do you send money first, or do they send the sofa first? Whoever goes first can get burned. Markets solved this with a trusted middle-friend who takes the money from one side AND the sofa from the other, then swaps them simultaneously — so neither side can cheat.

Definition. When your trade executes on the exchange, nothing has actually moved yet — it’s a binding agreement, not a completed exchange. Settlement is the actual swap: shares delivered one way, cash the other. In US stock markets this happens on T+1: trade date plus one business day. Buy on Tuesday; the shares are legally yours Wednesday. (Until May 2024 it was T+2 — the system keeps getting faster. Decades ago it was five days and involved actual paper certificates and actual messengers.)

Standing in the middle is the clearinghouse (in the US, the DTCC and its subsidiaries — the deeply unfamous plumbing company of American finance). After every trade, the clearinghouse steps between the two parties and becomes the buyer to every seller and the seller to every buyer. Why? Counterparty risk — the danger that the other side of your trade goes bust between trade and settlement and never delivers. With the clearinghouse interposed, you don’t care who was on the other side or whether they survive the night: the clearinghouse guarantees your trade, backed by margin deposits it collects from all its member firms.

Worked example. You buy 100 shares at $40 ($4,000) on Monday. Tuesday — settlement day — the seller’s firm has gone spectacularly bankrupt overnight. Without a clearinghouse: you’re an unsecured creditor in a bankruptcy queue, clutching a trade confirmation. With one: the clearinghouse delivers your 100 shares anyway, using the defaulted firm’s posted collateral and its default fund. You likely never even learn it happened.

Misconception. “My trade is done the instant the app says ‘filled.’” Executed, yes; settled, no. For a day, what you own is an ironclad claim, not the shares themselves. Brokers paper over this so well you’d never notice — until an edge case (like withdrawing unsettled cash) makes the T+1 clock suddenly visible.

When it matters. Almost never, which is the point — settlement is infrastructure you only notice when it breaks. But it explains real frictions: why freshly sold cash may take a day to withdraw, and why, during the 2021 meme-stock frenzy, brokers restricted buying — the clearinghouse demanded billions in extra collateral against wild volatility, and some brokers couldn’t post it fast enough.

Lock in the plumbing vocabulary.

Pick the right option for each blank, then check.

US stock trades settle on a schedule — buy on Monday and the shares are legally yours on . The steps into the middle of every trade, becoming the buyer to every seller and the seller to every buyer, which eliminates — the danger that the other side fails to deliver.

The regulator — the SEC in one paragraph

Watching over all of it sits the SEC (Securities and Exchange Commission), the US government agency created in 1934 after the 1929 crash demonstrated what a fully unsupervised market does for an encore. Its mandate is to protect investors and keep markets fair and orderly. In practice: it forces listed companies to disclose audited financials and material news (so everyone trades on the same public facts), prosecutes insider trading and fraud (trading on secrets or peddling lies), licenses and audits brokers and exchanges, and writes the rulebook — including the settlement clock and PFOF disclosure rules you just met. One mental model is enough for now: the SEC doesn’t protect you from losing money — that’s still gloriously your own business — it protects you from being cheated. Other markets have counterparts (the UK’s FCA, the EU’s ESMA, Spain’s CNMV), playing broadly the same role with different acronyms.

The full cast — match each character to its actual job.

Pick a term, then click its definition.

The journey of a tap — teaser for next lesson

String it all together. You tap “buy 5 shares” on your phone, and in well under a second:

  1. Your broker receives the order, checks you have the cash, and routes it out —
  2. — to an exchange (or to a market maker that paid for the order flow), where the matching engine pairs you with a seller —
  3. Match. The trade executes at an agreed price. Both sides get confirmations. The app cheerfully says “filled.”
  4. The clearinghouse steps in between you and the seller, guaranteeing both sides.
  5. Settlement, T+1. Next business day, cash and shares actually swap. Five shares now sit in your broker’s custody, in street name, with your name on the beneficial-owner ledger.
  6. The SEC never appears on screen — it’s the reason every step above happened under rules, on the record, with audited books.

Six handoffs, several institutions, one sneeze of elapsed time, and (probably) zero fees you can see. What we glossed over is step 2’s biggest decision: what kind of order you tapped — market or limit, and at what price you’re willing to deal. That choice is the entire next lesson.

Cause and effect: a clearinghouse member firm collapses overnight, after the day's trades but before settlement. For the ordinary investors who traded with that firm's customers yesterday, the most likely consequence is:

Putting it together

The market is a relay race that runs in milliseconds. The secondary market — where you’ll spend your whole investing life — is investors trading existing shares with each other; companies only get paid in the primary market, when shares are first issued. The exchange hosts and referees the trading, delivering liquidity, price discovery, and rules. Your broker is your licensed gateway in (and “zero commission” means hidden kitchens: PFOF, margin interest, cash sweep — legal in the US, with PFOF banned in the EU). Market makers keep two-way prices alive and harvest the spread. The clearinghouse guarantees every trade and runs the T+1 settlement swap, erasing counterparty risk. And the SEC polices the whole stage — against cheating, not against losses. The whole machine, one picture:

Big picture

The stock market's plumbing — full cast and flow

  • The Stock Market
    • Two markets
      • Primary: company sells NEW shares, gets the cash (IPO)
      • Secondary: investors trade existing shares — company gets $0
    • Exchange (NYSE, Nasdaq)
      • Matches buyers and sellers
      • Liquidity + price discovery + rules
      • Regular hours: 9:30–4:00 ET
    • Broker
      • Your licensed gateway to the exchange
      • Custody: shares held in street name
      • Zero commission ≠ free: PFOF, margin, cash sweep
    • Market maker
      • Always quotes a bid and an ask
      • Earns the spread, not a directional bet
    • Clearing & settlement
      • Clearinghouse guarantees both sides of every trade
      • Settlement = actual swap of cash and shares
      • T+1 in US stocks since May 2024
    • Regulator (SEC)
      • Disclosure, anti-fraud, insider-trading police
      • Protects you from cheating, not from losses
Companies raise money once, in the primary market; everything after is investors trading with each other through a chain of specialists — broker to exchange to market maker, with the clearinghouse guaranteeing settlement and the SEC refereeing it all.

A mixed recap pulling from the whole lesson:

Question 1 of 50 correct

A company announces terrible news and its stock drops 20% in a day on heavy trading. How much cash did the company itself lose to all that selling?

Check your answer to continue.

Key Takeaways

Success:

What to remember

  • Your money goes to another investor, not the company. Companies raise cash once, in the primary market (IPO); the secondary market — your entire trading life — is investors swapping existing shares while the company watches from the sidelines.
  • Exchanges match; they don’t set prices. NYSE and Nasdaq exist to provide liquidity, price discovery, and rules — the upgrades that turn a garage sale into a market.
  • Brokers are your licensed gateway — you can’t trade on an exchange yourself. “Zero commission” means hidden revenue: payment for order flow (US-legal, EU-banned), margin interest, and the cash-sweep yield gap. Shares sit in street name; you keep all the rights.
  • Market makers always quote both ways and earn the bid–ask spread — they’re toll collectors, not direction bettors.
  • The clearinghouse guarantees every trade (killing counterparty risk), and settlement is T+1: shares and cash actually swap one business day after the trade.
  • The SEC protects you from being cheated, not from losing money — disclosure, anti-fraud, and the rulebook everyone above plays by.

Mark lesson as complete