An IPO is the first sale or offering of a stock by a company to the public. It happens when a company decides to go public rather than remain solely owned by private or inside investors. The Securities Exchange Commission (SEC) has strict rules that companies must follow before issuing an IPO.