This is rather a lot you're asking for, and this is widely and well documented. Although only of historic value now, which is sort of my point.
Let's start with the most basic of basics, the "greater fool" principle. In that when someone makes an investment, they intend to get a return on it, perhaps interest and return of the principle for a CD or other loan, or being able to sell their stock to a "greater fool" then they.
But investments in privately held companies are famously illiquid. If you own 10% of Brand New Web Startup (BNWS), ignoring whatever contractual conditions there may be on selling your share, you can only sell it to a "qualified investor", i.e. not a widow or orphan but a person of documented wealth (and that's been tightened recently). And for these sorts of small companies finding a buyer can be extremely difficult.
This is generally true even if the company is well established, nicely profitable, and looks to have a good future. It's called the "cashing out" problem, and my father made more than a small amount of money helping founders and investors in small companies do that.
So that's the general background. One route opened up in the late '50s (this is from memory, and I don't remember exactly what the detail was, venture capital preceded this), is an Initial Public Offering, where you use an investment bank to offer a fraction of your company to the general public, as shares of stock. If this transaction is successfully completed, you and the investment bank have big bags of money, and many generic, not necessarily "qualified", investors have shares of stock in your company. And your company is now "public", it has shares traded on an exchange, those shares are liquid, and you're subject to a whole lot of law and regulations, again, to protect those widows and orphans who are now allowed to buy a part of your company.
Sarbanes-Oxley was the final nail in the coffin of going public with an IPO because it made being a public company unreasonably expensive, onerous, and legally dangerous.
Almost all companies that would have previously paid back their venture capitalists through an IPO have to use another route, and being bought by a big company is the easiest and perhaps most common method (but one that most of the time is ruinous, the history of high tech mergers and acquisitions is horrible). Our host made his money this way, selling Viaweb to Yahoo, and you can look up some of the aftermath in his essays.
This, BTW, no doubt has something to do with VCs' having flat returns for the last decade.