The stock market operates through a network of exchanges, such as the New York Stock Exchange (NYSE) and the NASDAQ. Companies list their shares on these exchanges through an Initial Public Offering (IPO). Investors can then trade these shares through brokers, who act as intermediaries in the transactions.