Peritonitis means exactly what Webster 1913 says, which is "Inflammation of the peritoneum" but that does not say anything about what it IS.
Signs of peritonism are guarding and rebound tenderness in the abdomen. These can be localised to a particular area or generalised.
Appendicitis can lead to local peritonitis in the right iliac fossa as the inflamed appendix irritates the peritoneum it is close to, leading to pain in the lower right side of the abdomen.
Generalised peritonitis usually (but not always) results from perforation of some part of the gastrointestinal tract, leading to bacteria-infested bowel contents spilling into the peritoneum and causing rampant infection. Generalised peritonitis causes severe pain, board-like guarding of the abdomen and is a VERY serious condition. Untreated appendicitis usually leads to perforation of the appendix and thus to generalised peritonitis. Not good. Other causes of peritonitis would include perforated ulcers (duodenal ulcers or gastric ulcers) and abdominal wounds piercing the peritoneum from the outside.
Usually, the only reasonable treatment for generalised peritonitis is surgical - laparotomy is needed to open up the abdominal cavity and fix the underlying problem.