The wall of the heart consists of three layers: the epicardium (external layer), the myocardium (middle layer) and the endocardium (inner layer).