A heart attack is also known as a myocardial infarction. It occurs when the part of the heart muscle could not get enough blood supply. Coronary artery disease is the major cause of heart attack.