The process of selling stocks for a company never traded publically before. IPO is an often used acronym.

It goes roughly like this:

A company wants to offer the public stocks in the company. There are many reasons for this, the primary is to raise capital for investments and expansion. When you do an IPO, an investment banker is contacted. The banker is responsible for advising you, distributing the stocks and the underwriting. The banker will demand security for the investment and you set a price for the total amount of stocks to be offered. This price is an estimation, since the forces of the market control the final prize. After an agreement is reached, the investment banker is the trader of the stock.

There are two types of agreement that can be reached with the banker.
1) Firm commitment: The banker buys all the stocks and resells them. High risk for the bank, low risk for the company.
2) Best Effort Commitment: The investment bank sells the stocks, but do not guarantee an amount.

The investment bank will handle smaller issues like filing an act of full disclosure for you. This is mainly information on the company, its business, its people, debt, financial state and legal issues with the company.

After a 30 day "cooling off period" the SEC will issue either a "Letter of deficiency" saying 'no' to the IPO and why or a 'yes' telling the date of the IPO. In this period, the investment will try to hype the company as much as possible to attract buyers. The selling date arrives and the stock is sold, money is collected.