A heart attack happens when the flow of blood to the heart is obstructed, most commonly owing to plaque buildup in the arteries.