Exercise both reduces the risk of a heart attack and protects the heart from injury if a heart attack does occur. For years, doctors have been trying to dissect how this second benefit of exercise works, with the aim of finding ways to protect the heart after a heart attack. Researchers have identified the ability of the heart to produce and store nitric oxide as an important way in which exercise protects the heart from injury.