IPO or Initial Public Offer is a way for a company to raise money from investors for its expansion or future projects and get listed to Stock Exchange. When a company wanted to list its shares in the stock market, the first step is to go for an IPO where the company shares are first made available for the public to buy and after which those get listed on the stock exchanges for trading.
The initial offering of shares is called the primary market offering. And when shares get listed on the stock exchanges and get trades, it is called the secondary market.