The peritoneum is a SEROUS membrane, although as far as the patient's prognosis is concerned, serious is probably more apt.
Serous means producing or containing serum. During peritonitis the bacteria and/or fungal infected serum along with infected cells, pus and fibrin strands are released into the abdominal cavity. The rest is as LazyGun says.
Peritonitis can also be caused by parasites, lupus and other diseases and sometimes, abdominal injury.
I worked in a university a few years ago where a lab technician accidentally inhaled a large quantity of Hydrogen Chloride gas. This gas dissolves in water to form Hydrochloric Acid. Within hours of being treated in hospital, for gas exposure the technician developed appendicitis and her appendix ruptured an hour after that. Following emergency surgery she fully recovered but she sustained what was called chemical peritonitis as a result of the gas inhalation.