A heart attack (myocardial infarction) occurs when blood flow to the heart muscle is blocked, usually by a blood clot in a coronary artery. This lack of blood supply causes heart muscle cells to die. It's not caused by bacteria, and the heart doesn't completely stop beating (that's cardiac arrest).