What exactly, makes batteries leak and corrode?

Also is there any way of stopping this from happening in my flashlights?
5 answers 5