An IPO or an Initial Public Offer where companies raise money for their business needs. Say, for example, a steel manufacturer wants to expand capacity or a hospital wants to add more beds. What can they do for the extra funds? One way to do it is to borrow from a bank. Another way is to raise money through an IPO. As an investor, you can apply for the IPO and get shares allotted to you. Normally, when good companies come out with IPOs they get listed on the stock exchange at a premium to the issue price. That is your profit.
There is nothing like a good IPO or a bad IPO. Every IPO depends on the company and the price at which the IPO is coming out.