IPO or Initial Public Offer is a way for a company to raise money from investors for its future projects and get listed to Stock Exchange. Or An Initial Public Offer (IPO) is the selling of securities to the public in the primary stock market.
From an investor point of view, IPO gives a chance to buy shares of a company, directly from the company at the price of their choice (In book build IPO's). Many a times there is a big difference between the price at which companies decides for its shares and the price on which investor are willing to buy share and that gives a good listing gain for shares allocated to the investor in IPO.
From a company prospective, IPO help them to identify their real value which is decided by millions of investor once their shares are listed in stock exchanges. IPO's also provide funds for their future growth or for paying their previous borrowings.