This depends on the country, but in most cases it is THE GOVERNMENT itself (i.e. the taxpayers) that foot the bill if a bank folds. This is often because of the "too big to fail" situation in which a banking institution is so embedded in society that its failure would cause catastrophic economic impact, such as plunging a country into a recession.