How exactly does appendicitis occur?

Variable. The appendix is an appendage of the intestine. The most common cause is obstruction. This can occur secondary to a fecalith (hard pellet of stool) of swelling of the lymphoid tissue that lines the appendix. This makes appendicitis more common in children prone to constipation or gastroenteritis.
Unknown. Appendicitis is the development of an infection in the appendix, a small pouch attached to the beginning of the colon. It is unknown why this occurs. Treatment is surgical removal of the appendix.