As a startup founder, you must be thinking about how do venture capitalists make money when all they do is invest in startups, many of which are in losses. Well, startup investments are long term commitments. VCs never look for instant small profits. Rather they invest in startups for long term high returns.
When you take money from a VC, you give them an ownership stake in the company. They sell this stake when your company's valuation increases and you go public (IPO), get a larger investor on board, get acquired, or repurchase the shares from them.
As and when your startup becomes profitable, the VCs earn money in the form of dividends.
There are times when you invite the investors to become your CFO, CEO, etc. In such a case, the investor receives a salary as any other company employee.