In investing, there are two distinct markets - primary market and secondary market. Primary market is the place, where a security (stock) is created. Secondary market is the place where securities (stocks) are traded. A security is created in the primary market through a process known as Initial Public Offering (IPO). IPOs have been a very popular investment options both for retail and institutional investors since it has the potential of providing considerable capital appreciation for investors. Many IPOs over the last 10 - 15 years have given multi-bagger returns (i.e. more than 2 - 3 times) on listing.
When a private limited company wants to raise funds to invest in the next stage of business growth, it has the option of taking their company public. In other words, the company will list itself on the stock exchange and invite subscription or investments from public e.g. institutional investors, HNIs and retail investors. The investors will in turn, become the shareholders of the company. Once listed, the shares of company will be traded in the stock exchanges. While the main purpose of an IPO is to fund the next stage of business growth, it also provides opportunity for some of the early stage investors (pre-listing) to exit their investments through the IPO.
You need to have Demat and trading accounts to invest in IPOs. You can open a Demat and trading accounts with a stockbroker after fulfilling KYC requirements and providing the necessary documentation (e.g. identity proof, address proof, PAN, bank details etc). When a company announces its IPO, you can either subscribe to it online or filling out the subscription form and submitting it to your stockbroker. You need to provide your depository details and place your order (i.e. quantity, amount etc).
As mentioned earlier, you may not be allotted the number of shares subscribed; it will depend on the over-subscription / under-subscription. Please note that an under-subscribed IPO may be cancelled or postponed. However, the issuer may not always cancel or postpone an IPO just because it is under-subscribed. A very famous example of an under-subscribed IPO was Google in 2004; Google was forced to reduce the offer price. Yet today, Google or Alphabet has been one the biggest wealth creators for investors.
You can exit your investment in an IPO by selling your allotted shares on the listing day or holding your investments longer and selling it later. If you sell your IPO shares on listing days, you can make listing gains but there is no guarantee that you will get listing gains. You can also hold your shares for a long investment horizon, if you think that the company has good growth potential.