Equity or Stock is nothing but a share or stake in the company’s total asset. By being a shareholder you virtually have a share in all the company’s assets including its machinery. But this does not mean for ex. that being a shareholder of a retailer; you could just walk into their shop and get a shirt for free. Your gain on being shareholder is when the market price of the company increases more than your buy price. We will see on how the market price of the stock increases and decreases later on. Another gain on being a shareholder is when the company pays you a dividend per share that you hold. But it is not always necessary that the company pays you a dividend. Also on being a shareholder you get voting rights.
So why does a company issue shares when it very well could keep the profits to themselves. The answer is simple: To raise money. When the business grows and the company needs more money for expansion then the company might decide to become public by issuing an IPO or initial public offering. When it raises money in this manner its called equity financing. The advantage for the company is that it does not need to pay any fixed dividend or interest periodically. Also there is the debt financing when the company issues bonds .But the advantage here is that the bond holders would get a fixed dividend periodically irrespective of whether the company is doing well or not. But the growth or returns from Stocks would be higher than a bond. If the company goes bankrupt and all its assets including machinery sold then the stock holders would be the last in line to get their share, the bond holders and other creditors would be paid off first.