The heart is enclosed in a protective sac, the pericardium, which also contains a small amount of fluid. The wall of the heart is made up of three layers: epicardium, myocardium, and endocardium. The heart pumps blood with a rhythm determined by a group of pacemaking cells in the sinoatrial node.