A heart attack occurs when one or more coronary arteries become blocked, reducing blood flow to the heart muscle. This can damage or kill heart muscle depending on how much is affected. Electrocardiograms and cardiac catheterization can be used to diagnose the location and extent of blockages. Angioplasty and stenting are common minimally invasive treatments that use balloons and mesh tubes to reopen blocked arteries, while bypass surgery is an alternative for blockages not cleared by angioplasty. Lifestyle factors like smoking, inactivity, diet and genetics contribute to the risk of heart disease.