The heart has a lot of help to keep it in the right place, protect it from infections, and lubricate it. The pericardium, in two layers, helps to lubricate the heart also.
Being a support system for the heart, many things can go wrong with the pericardium. Too much lubrication can cause problems. And the part that is supposed to prevent inflammation and infection can become infected itself.
It's hard to protect yourself from these problems. I think the best you can do is eat nutritiously, exercise, and try to live a less stressful life.