Not Medical Advice: As per Anatomy & Physiology, the heart is enclosed in a double-walled sac called the pericardium. The loose fitting superficial part of this sac is the fibrous pericardium.
The fibrous pericardium:
protects the heart
anchors it to surrounding structures
prevents overfilling of the heart with blood
Deep to the fibrous pericardium is the serous pericardium, a thin, two-layer serous membrane that forms a closed sac around the heart. It’s parietal layer lines the internal surface of the fibrous pericardium. At the superior margin of the heart, the parietal layer attaches to the large arteries exiting the heart, then it turns inferiorly and continues over the external heart surface as the visceral layer, also called the epicardium, which is an integral part of the heart wall.
Between the parietal and visceral layers is the pericardial cavity containing a film of serous fluid. The serous membranes are lubricated by the serous fluid glide past each other, allowing the heart to work in a friction-free environment.
Learn about the Anatomy of the Heart at National Institutes of Health.