Pericarditis is an inflammation of the pericardium, the thin sac-like membrane surrounding the heart. This condition can cause chest pain and is often associated with a variety of underlying health issues such as infections, autoimmune disorders, and heart surgery.