Engage an underwriter which will place a value on your stock. Investment banks are usually hired for this purpose after the company declares its intent to go public. These financial institutions will then ensure the sale of the stock either on a full commitment basis, where they will buy the shares upfront, or on the best efforts basis, where they will be give their best shot to sell the securities.
File with the Securities and Exchange Commission, which will ask you to document all relevant details about the company. A prospectus will be issued, which will provide a detailed outlook of the business, its shareholders, profitability, growth prospective, and financial standing. The prospectus will further contain information on the exchange it has opted for public trading. There are various markets for this purpose, which also include NASDAQ and New York stock exchange.
Essentially there are two ways to execute a trade; exchange floor and electronic trading.
In the former, which is usually a traditional way, you will inform the broker about acquiring a specified number of shares of a particular company. Your broker will inform the floor clerk on the exchange, who will then find a broker willing to sell the desired number of shares. A price will be asked and agreed upon between the two parties, and you will then pay the amount. In return, you will get hundred stocks.
In electronic trading, you will need to open a brokerage account, but the major work is still done by the brokerage dealer who will manage your account. He or she will find potential buyers and sellers through an electronically worked system. For instance, if you want to buy 100 shares of a company at $20, and it is listed on the NASDAQ, the dealer will transmit the order to that exchange where an electronic system will help the exchange match your order. If a match is found, the exchange will inform your broker, who will then complete the deal by withdrawing money from your account and further update your profile to display the new stock.
For a company, whenever a share is sold, the money will be transferred to your account, which will be then used for various purposes.