7 famous founders talk about leaving their own companies
Sometimes founders can be forced out if the board decides to do so. (That's one reason why founders have become fond of dual shares and other such protections).
Or, sometimes, founders force themself out, if they get so embattled they resign.