Bail-in is a fundamental change to insolvency law. It is a power given to the regulator to declare a bank non viable, whether it is because of capital or liquidity concerns, and to imposes losses on its bond holders over the course of a week end. This would auto-recapitalise the bank which should be open for business the following Monday with a healthy capital position. You can think of it as a flash, extra-judiciary chapter 11, specific to banks.
The intention is to imposes losses on wholesale investors of the bank, essentially investors in bonds and capital instruments, and to spare depositors, even if technically depositors have the same ranking than bond holders (and therefore would share the losses equally in a bankruptcy). However should the magnitude of the losses require an extraordinary large bail-in, uninsured depositors may be targeted too (essentially corporate clients and high net worth individuals).
Banks are required to accumulate a large amount of wholesale funding to ensure that there is enough debt to bail in the day the shit hits the fan.
This should largely mitigate the too big to fail, as it would avoid the messy aspects of a large bank bankruptcy (Lehman scenario) while not using any tax payer money and making investors bear the losses related to their investments.
Does it solve all problems? God knows what will be the magnitude of the next crisis. If the US, the UK or France default, that may not be sufficient to save the banking system. But it should certainly mitigate a lot the too big to fail risk. And it is extremely unlikely that a bail-out would be considered before a bail-in would have happened.
Disclaimer: I work in a bank.