This is one of my favorites questions...
It all depends on what contract you have in place between the founders. Usually, they all work for a company (C corp, LLC, whatever), even if they are not receiving a salary. In that case, and assuming some kind of legal document was set in place, the company would own the rights to all the work that has been done and therefore it doesn't matter if someone leaves: the company always survives and has the rights to continue using whatever was developed.
A side question is that of vesting of stock. Short answer: you should always have vesting in place (typically over 4 years, short or no cliff for founders). If someone leaves the project within months of haivng started, they lose most of their shares. Fair and simple.
You can read some more details on why handshakes are bad between co-founders.
When my partner and I started our LLC, our operating agreement had a buyout clause as an exit strategy that requires the departing company to buyout the other partner. It works like this:
Whoever pays owns 100% of the assets.
It will be different on a case by case basis. How much work did they do (coding or business stuff) Was it his or her idea? Do they plan on being involved going forward in a lesser role or no role at all?
Whatever you decide be sure to get it in writing before you start the company. I would encourage you to include a vesting schedule for stock, so one partner couldn't leave with 50% of the company unless they were there for a long enough period of time.
I hope you didn't sign a 50/50 agreement already with no exit strategy?
Usually I have two clauses to save me:
1) As already mentioned, a time-curve to 'own' the stock
2) A shotgun clause (particularly among early exit), so I can buy them out.
If they get stock for one year it comes down to how much work they have done. At the most I would give 10%, usually less. Normally I'd leave them with nothing for bailing (unless their reasons were very legitimate) - then I'd buy them at at a low cost.
If it is an LLC, prepare an Operating Agreement that should clearly define all of these type of "what-if" scenarios and much more. As long as it was clearly defined and agreed upon "before you started, you can have it done in a variety of ways - of which stock, and vesting is an option (like others indicated)