IPO (initial public offering) is the first sale of a company’s shares to the public, leading to a stock market listing, known as a flotation in the UK. This is done by listing the shares on a stock exchange of the company's choosing such as the London Stock Exchange.
An IPO is also referred to as a public offering, this is a sale of securities to the general public, rather than directly to select institutional or large investors (as in private placement).
Shares are offered to the public for various reasons including to:
Empirical studies show that the main reason for listing is the creation of paper money to finance acquisitions.
At the same time, a listing carries a number of costs including the obligation to produce financial statements, adopt corporate governance codes and pay dividends when required. Quoted companies need to have investor recognition and they are also subject to shareholder monitoring. Finally, there is a possibility of a change of control.
The most debated costs of IPOs relate to the issuance costs which appear to be high (about 11% of the proceeds), underpricing (the fact that the first day trading price is in general higher than the offer price), and the post-IPO stock price performance which, on average, is negative. Given their relatively high level of risk, ipos should normally generate positive returns.
A number of theories are provided to explain this puzzle. These include signalling as IPOs suffer from high information asymmetries, agency conflicts, market sentiment, investment banks, short sellers, sales by major shareholders/ lockup expiry, and fundamental difficulties in valuing young and high growth companies. 
An offering can also include new shares, as in an IPO, or previously issued stock, as in a secondary offering.
In a flotation, shares are issued in the primary market, this is where new securities are issued and sold directly by the issuer to investors. Any trading after that takes place on the secondary market - where something is traded after having initially been sold (on the primary market) by the original owner or issuer.
A company will need to hire lawyers and an investment bank when making plans to go public. Preparation includes an underwriting process by a syndicate made up of a group of investment banks. The bank will help value the shares, prepare a prospectus containing information about the company and help generate some interest about the shares among investors. 
In May 2012, Facebook’s IPO at $38 valued the company at $104bn, propelling it into the ranks of the top 25 US public companies. However, since flotation, the stock price of facebook carried on decreasing, reaching about $19 in August 2012. 
But what is Facebook really worth? Our interactive valuation calculator illustrates how variations in key assumptions can change the potential market value and share price of an IPO.
A step back from the market
The costs and challenges of delaying a listing
Lex in depth: Facebook
Lex columnists run the numbers in the first of a monthly series scrutinising corporate valuations