Getting an IPO at the right time can mean massive returns to your portfolio if you play it right. But before diving into every new company that shows up on the NASDAQ, it’s important to understand how IPOs work, why a company would go public, and the pitfalls you as an investor should know.