when investors buy shares through an ipo they are participating in what is known as the primary market in the primary market the securities you purchase come directly from the company issuing them by comparison the secondary market is one where you purchase securities from other owners of that security who either previously purchased them from the issuer or else purchased them from another owner entirely the vast majority of transactions that take place are done in the secondary market making ipos relatively rare and closely watched events 
from the perspective of the company there are many potential reasons to undertake an ipo to begin they may wish to raise funds for expansion such as by building new facilities hiring new employees funding increased research and development r d initiatives or even acquiring a competitor in this case the ipo would represent a form of equity financing in other cases a company may wish to ipo in order to increase the liquidity available to its early investors some of whom may wish to cash out their investment additional advantages may also exist such as the increased prestige credibility and creditworthiness that is often associated with publicly traded companies real world example of a general public distributionxyz corporation is a prominent technology company that is contemplating how best to fund its expansion plans its managers feel that by opening new offices abroad and hiring new employees they can effectively expand their customer base outside of the united states moreover they see opportunities to acquire several small competitors they feel could add intellectual property and human resources to their portfolio in considering their options for fundraising xyz decides to opt for equity financing through an ipo to finalize their decision they must decide between a general public distribution or a conventional public distribution in the former a greater percentage of their issued shares are likely to be held by retail investors whereas the latter will generally tend toward more institutional ownership in practice however the two different types of ipos will likely lead to similar medium and long term results this is because once the shares are sold in the primary market investors will then trade them among themselves in the secondary market for example suppose the shares are issued to institutional investors but there is unmet market demand from retail investors in that scenario there would be nothing stopping those retail investors from making offers to purchase those shares from the institutional investors in the secondary market likewise if the shares are sold mostly to retail investors but demand for the shares then rises among institutional investors retail investors will be free to sell their shares in this manner the secondary market should ensure that xyz s stock is ultimately held by those owners who value it most highly regardless of who receives the shares in the ipo 