A stock (typically called a “share”) is a type of security or investment that represents a partial ownership of a company. When you hear people saying “I am buying stocks”, it generally means they’re investing in a company by buying a portion of that company.
Now, you might ask, how and why do companies sell a portion of themselves? There are a number of reasons. For example, when a company wants to expand their business, they may need more money (capital) to fund that expansion. For them to do that, they can either borrow money or sell portions (or shares) of their company. The latter is what happens when you buy a stock. You buy a share of that company and in return, you become a shareholder of that company and also fund the company’s expansion.
For this to happen, most companies go “public” in a process called Initial Public Offering (IPO). During the IPO process, a company issues shares to investors to raise the money they would need. Once an IPO is complete, stocks will be available for trading in the stock market.