The fee structure of a VC firm is similar to that of a hedge fund: they take a management fee (based on the committed fund size) and a performance fee (based on the profits, if any, from investing). Typical numbers are 2% annually and 20%, respectively.
If a VC fund invests $100 million in a company and, after four years, the company goes kablooey, that actually cost the LPs about $110 million or so. The VCs made $10 million.