The person needs to speak to the relevant swiss authority (unemployment registration) ASAP - they will explain all the details.
If you have been in Switzerland long enough to be eligible for unemployment benefits, then you may even be successful in getting your B permit renewed whilst unemployed.
I think the unemployment benefit is a percentage of your last salary per month, it may also reduce over time, and for about two years before you run out and probably revert to some sort of very basic benefit.
Hope that helps - It's hard enough being out of a job at the best of times, let alone when it's unexpected and not in your home country...