Stocks, also known as shares, are small pieces of a company. A company will sell these small pieces to investors as a way of raising money to use to grow the business.
Stocks can be bought and sold, usually on stock exchanges. Buying stock in a company makes you a shareholder, and means that you own a small percentage of the company. Shareholders can earn money when the company goes up in value, especially if it decides to pay out dividends*, but there are operational risks to consider.
*Note: Even if a company has a profitable year, they have no obligation to pay out dividends. It's up to each individual company to decide whether to pay them.