IPO = Initial Public Offering. Before an IPO, only founders, employees and early investors own the company. After the IPO, anyone with a demat account can buy a share.
Companies IPO to raise money — for a new factory, to pay down debt, or to give early investors a way to sell.
IPOs feel exciting because everyone talks about them and prices swing wildly in the first weeks. That excitement often makes the first-day price higher than what the business is actually worth.
Practical tip: read the RHP (Red Herring Prospectus) or at least the risk factors. Ask: would I buy this company at this price if it were already listed for 5 years?