If the patient is in the hospital, we can even do a rapid angioplasty to diminish obstruction of a vessel and prevent further damage. Of course, the heart muscle has received some damage, but not enough to cause death, and later, the patient is at risk for heart failure. The patient may have many years before this happens. You can survive a heart attack in your 40's, for instance, and not develop heart failure until you're in your 60's. The highest-risk group includes anyone who has had a heart attack.
Age is also a major risk factor for heart failure, as is diabetes.
Also, people with damaged heart valves. The problem arises when some part of the heart has been damaged, so the heart pumps harder to try to compensate. This eventually leads to a thickening of the heart muscle, which further weakens the ability of the heart to pump. As a matter of fact, there are some purely genetic cases of heart failure, where no heart attack exists. The problem usually shows up when the patients are older.