Thursday's initial public offering of Chipotle Mexican Grill ( CMG) was a sizzler, with the shares doubling on their first day of trading. With gains like that, it's no surprise that many of our readers have been asking about IPOs and how the process works. Here's our best explanation.

IPOs are a bit like a corporate version of a coming-out party. Depending on the company's prospects for growth, there may be many suitors eager to take part in the bash.

The offerings occur when a company first issues stock to the public. They may come from established companies that have, for one reason or another, long been closely held by a few large investors. Goldman Sachs ( GS), which went public in the spring of 1999, is such an example. The investment bank was founded in the mid-1800s and remained a private partnership for over 100 years before opening itself up to public ownership.

But most often, IPOs are from relatively new companies looking to tap the public market to fund their expansion plans.

Typically, a company begins as a start-up with venture capital funding -- private-sector money from well-heeled firms or individuals who make it their business to invest in early-stage companies.

If the company determines that stock market demand for its business is strong enough, it will hire investment banks to take it public. The investment banks become the underwriters of the deal: They buy the shares from the company and sell them to the public at a preset price.

Initial offerings may also come from an operation within a larger company, with the parent company eager to open the division to the markets and unlock its shareholder value.

Such was the case with Chipotle, which was spun off from McDonald's ( MCD). The 13-year-old burrito and taco purveyor is much smaller than its burger-giant parent, with about 480 stores and $471 million in revenue in 2004.

IPOs often can cause strong demand. Back in the late '90s, the IPO market was booming as investors scrambled to get a piece of the latest hot technology company that came to market. That exuberant buying could cause the stock price to pop well above the preset price on the first day of trading.

But as many rookie investors discovered, that first-day "pop" generally does not last very long, so you could see the stock price retreat in the days and weeks following the IPO. So buyer beware: Fortunes can be gained and lost fairly quickly in the world of IPOs.

It has yet to be seen if Chipotle will be an incredible growth story or a flashback to the go-go '90s. After Chipotle's underwriters set the cost of each share at $22 apiece, strong investor demand caused the preset price of the stock to be bid up significantly -- even before it started trading. On the New York Stock Exchange, the specialist sets the opening price according to investor demand, while on electronic trading systems like the Nasdaq , computers match up buyers and sellers at the appropriate level.

By the end of its first day as a public company, Chipotle saw its shares double in price to $44. The debut marked the biggest opening-day gain for a U.S. IPO since late 2000, according to Thomson Financial. It was the biggest opening-day percentage gain on the New York Stock Exchange since Martha Stewart Living Omnimedia ( MSO) went public in 1999.

IPO investors take note, however. At their $44 closing price, shares of Chipotle are trading at roughly 80 times earnings. Meanwhile, established restaurant chains Applebee's ( APPB) and Ruby Tuesday ( RI) are trading closer to 20 times earnings, making Chipotle's valuation look steep, even when its growth prospects are accounted for.

The Regular Way and the Google Way

There is another method for companies to offer stock. Google's ( GOOG) successful 2004 IPO sidestepped the usual route by using a Dutch auction, in which investors bid on the shares in an open auction vs. having an investment bank divvy them out to clients, a practice that many market-players believe lends itself to abuse and unfair distribution of precious IPO shares.

For example, in order for the average investor to get a hold of a hot IPO deal not being brought public in a Dutch auction -- like a Chipotle -- the best way, and maybe the only way, would be to drum up huge trading commissions with the brokerage house underwriting the IPO. This is not always a feasible solution, however, which is why many smaller investors accuse brokerage houses of pandering to their wealthy clients.

In their defense, the brokers say they are just rewarding their best clients with IPO shares, just as any business owner rewards his most loyal customers. For the little guy who feels this is just another way the rich get richer on Wall Street, that's an unsatisfying explanation. Unfortunately for the average Joe, the system doesn't seem apt to change anytime soon.

More from Personal Finance

All 2018 Graduates Must Watch Jim Cramer's Bucknell Commencement Speech

All 2018 Graduates Must Watch Jim Cramer's Bucknell Commencement Speech

The Best Investment Advice? Stay Diversified

The Best Investment Advice? Stay Diversified

Use This Simple Investing Strategy to Stay Ahead in a Rollercoaster Stock Market

Use This Simple Investing Strategy to Stay Ahead in a Rollercoaster Stock Market

5 Most Ridiculous Royal Wedding Memorabilia Items

5 Most Ridiculous Royal Wedding Memorabilia Items

7 Ways Your Financial Adviser Should Help You Survive Rising Interest Rates

7 Ways Your Financial Adviser Should Help You Survive Rising Interest Rates