They run the company. If the business is cash flow positive, they can just set their salary to be whatever they want.
Your VC will be very unhappy if you overtly cash out, and you can be subject to a minority-shareholder lawsuit if you stop reinvesting and direct 100% of the profit into your own pockets, and it is tax-inefficient to direct most of your profit as salary instead of long-term capital gains (which in the US are taxed lower than regular income) but nothing stops a founder from making their salary be $1MM a year or whatever.