Pericarditis is inflammation of the pericardium, a sac-like structure with two thin layers of tissue that surround the heart to hold it in place and help it work. A small amount of fluid keeps the layers separate so there's less friction between them as the heart beats.