Bile is produced in your liver and collects in the gall bladder. There is a complex system of ducts which moves bile from the liver and into the gall bladder and out of the gall bladder and into your intestines.
To remove your gallbladder the surgeon has to carefully separate it from the liver. During this procedure, the cystic duct and cystic artery must be clipped so that the gall bladder can be removed without any bile leaking into the abdomen.
Very occasionally the surgeon does not manage to properly locate your cystic duct an cystic artery and makes a cut or burn to your common bile duct or common hepatic duct.