You may have heard that investing in stocks can be a great way to create wealth over time. That's certainly true. But do you really know how the stock market works? Do you know what makes a stock market different from a stock exchange or stock index? Do you know what a stock is?

If you answered no to any of these, you aren't alone. Here's a rundown of the basics of stock markets, stock exchanges, and stock indexes.

A digital stock market chart going up.
Image source: Getty Images

How does the stock market work?

Before we get into stock markets, you need to understand stocks and how they work on a basic level. Here are a few basic concepts that can help new investors understand how the stock market works.

What is a stock?

Stocks represent an ownership interest in businesses that choose to have their shares available to public investors. You may also hear stocks referred to as equities or equity securities.

A share of stock represents an ownership interest in a company. If you buy a share of Apple (NASDAQ:AAPL), you own a small part of the business and get to share in the company's success. Instead of being owned by an individual or a private group, some companies (such as Apple) choose to "go public." This means that anyone can become a part owner by purchasing shares of the company's stock.

Stock market basics

How does the stock market work? There are entire books explaining the stock market, and there's too much to explain in a few paragraphs. But you don't need to get too deep into the weeds to gain a good basic understanding of the stock market. Stock markets facilitate the sale and purchase of stocks between individual investors, institutional investors, and companies.

The vast majority of stock trades take place between investors. If you want to buy shares of Microsoft (NASDAQ:MSFT) and hit the "buy" button through your broker's website, you are buying shares that another investor has decided to sell -- not from Microsoft itself. By purchasing shares of a stock, you become an investor in the company.

Did You Know?

A stock's price is governed by supply and demand. If a lot of people want to own part of a certain company, then that company's stock price rises.

How are prices determined on a stock market?

Stock prices on exchanges are governed by supply and demand, plain and simple. At any given time, there's a maximum price someone is willing to pay for a certain stock – the bid price – and a minimum price someone else is willing to set for the shares of stock – the ask price. Think of stock market trading like an auction. Buyers are constantly bidding for the stocks that other investors are willing to sell.

If there is a lot of demand for a stock, investors will buy shares quicker than sellers want to get rid of them. This can move the price higher. On the other hand, if more investors are selling a stock than buying, the market price will drop.

There are plenty of catalysts that can push the market up or down. For example, in the 2022 stock market downturn, inflation pressures, supply chain issues, rising interest rates, and inflation fears were big reasons for the market's poor performance. But, at the end of the day, these factors resulted in more investors selling stock than buying, which is why we saw stock prices generally decline.

Taking it a step further, it's important to consider how it's almost always possible to buy or sell a stock you own. That's where market makers come in.

Market makers ensure there are always buyers and sellers

A key concept when it comes to understanding the stock market is the idea of a market maker. Specifically, there aren't always buyers to match up with sellers of stocks. However, stock trades typically go through in seconds. How can brokers buy and sell stocks in your account instantaneously?

Individuals known as market makers act as intermediaries between buyers and sellers. This ensures there's always a marketplace for stocks on an exchange. With a liquid market like this, investors can choose to buy and sell shares immediately whenever they want during market hours. Here's a rundown of what investors should know about the process:

  • Market makers buy and hold shares and continually list buy-and-sell quotations for shares.
  • The highest offer to buy shares listed from a market maker at any given time is known as the bid, and the lowest offered selling price is known as the ask.
  • The difference between the two is called the spread.

Because of market makers, you'll never have to wait to sell stocks at their full market value. You don't need to wait until a buyer wants your exact number of shares -- a market maker will buy them right away.

Related investing topics

What happens when you buy a stock?

Investors must carry out the transactions of buying or selling stocks through a broker. In a nutshell, a broker is simply an entity licensed to trade stocks on a stock exchange. A broker may be an actual person whom you tell what to buy and sell. More commonly, it is an online stock broker -- say, TD Ameritrade or Fidelity -- that processes the entire transaction electronically.

When you buy a stock, here's the simplified version of how it works:

  • You tell your broker (or input electronically) what stock you want to buy and how many shares you want.
  • Your broker relays your order to the exchange, and a market maker sells you shares at the current market price.
  • The shares are then delivered to your account.
"The Market is Up!"

When someone says "the market is up" or that a stock "beat the market," they are usually referring to a stock index.

How does a stock index track the stock market?

You've probably heard statements such as, "The market is up," or that a stock "beat the market."

Often when discussing the stock market, people generalize "the market" to a stock index. Stock indexes, such as the S&P 500 or the Dow Jones Industrial Average, are a representation of the performance of a large group of stocks or a particular sector. These are used as a benchmark to compare the performance of individual stocks or an entire portfolio. For example, the S&P 500 index tracks the performance of 500 of the largest publicly traded companies in the U.S.

Indexes are a convenient way to discuss an approximation of what is happening in the market. However, it's important to understand that the major stock indexes you see on TV and in the news do not fully represent the entire stock market.

Stock markets, stock exchanges, and stock indexes

There are three different terms here with similar and often misunderstood meanings:

  • Stock market: The process and facilitation of investors buying and selling stocks with one another.
  • Stock exchange: The actual intermediary that connects buyers with sellers, such as the New York Stock Exchange (NYSE).
  • Stock index: A numerical representation of a group of stocks that is used to track their collective performance.

The bottom line on stock markets

Knowing the basics of how stock markets work can help make you a better investor. You'll understand why your investments can be bought and sold at a moment's notice. You'll also understand that the market works like an auction system, and prices are governed by supply and demand and not just the underlying business fundamentals.

Our goal is to help you become smarter, happier, and richer!

Matthew Frankel, CFP® has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Apple and Microsoft. The Motley Fool recommends the following options: long March 2023 $120 calls on Apple and short March 2023 $130 calls on Apple. The Motley Fool has a disclosure policy.