Can someone tell me how to buy an IPO stocks

Im interested in buying an IPO on Friday but I have never bought one before. How does it work? Do I just buy it at market open?

Well, the whole reason was i wanted to make a quick profit when it goes public