A heart attack occurs when the perfusion to the myocardium is insufficient to meet the metabolic needs of the tissue, leading to irreversible tissue damage. The most common cause is a total occlusion of a major coronary artery.