Strictly scientifically speaking – there are 2 causes of
1. A plaque (cholesterol and lipoprotein buildup in coronary artery) ruptures and causes blood to clot at that site. Result? Blood supply to a part of the heart is completely or almost completely blocked. That part of the heart muscle gets damaged and die - if treatment is not immediately available.
2. Sudden spasm (constriction) of coronary artery stops the blood supply and results in damage and death of affected part of heart muscle.
But these are the proximate, most immediate, causes that result in a heart attack. You are looking at the surface. This information is good for academic understanding. But, hardly empowers you to stop these causes from creating heart attack.