Buying a stock means taking an ownership position in a publicly traded company. Once you purchase a stock, you become a shareholder.
In other words, when you buy shares of a company’s stock, you are buying a claim to the company's profit margin, because you are technically a part-owner in the company. Those who hold shares of Common Stock, the most typical form of stock, have voting rights in the election of the company’s board members.
For example, if company ABC issues 100 shares, and you buy 1 share (so-called common stock), you will be entitled to 1/100, or 1% of ABC's earnings, and one vote out of 100 to elect members to the board of directors. If the company pays out dividends, you are entitled to 1% of these dividends.
If the company dissolves or is bought by another company, you will get 1% of the proceeds, assuming the company debts have been taken care of (including bond obligations. Shares of stocks of publicly-traded companies are traded on stock exchanges.
The biggest stock exchange in the world is the New York Stock Exchange (NYSE), but there are many others such as the Tokyo Stock Exchange (TSE), London Stock Exchange (LSE), and the Bombay Stock Exchange (BSE). There are even other exchanges within the U.S., such as NASDAQ.
Stocks enter the market with Initial Public Offerings (IPOs), and the price of those shares is the only capital that the issuing company will raise with them. After that, the stocks are traded on the exchanges in what’s referred to as the Secondary Market, and the profits and losses are attributable only to the buyers and sellers of the shares on the open market.