Companies can raise capital through stock exchanges by issuing shares to the public. This process, known as an initial public offering (IPO), involves the sale of ownership stakes in the company to investors. By issuing shares, companies gain access to capital that they can use to grow, expand, or reinvest in their business.