Patients with a history of heart attacks, are at risk for life-threatening tachycardias, like ventricular tachycardia and ventricular fibrillation.
The last one may lead to death only within minutes.
So, it is important for those patients to be implanted a cardiac, heart defibrillator, which is electronic device, capable to monitor hearts rhythm, and when the heart develops a life-threatening tachycardia, this device sends an electrical "shock(s)" to the heart to terminate the abnormal rhythm and return the heart rhythm to normal.
There are some risks associated with procedure of implantation of this device, like infection at the site, swelling, bleeding or bruising where the ICD was implanted, damage to the vein where the ICD leads are placed, bleeding around the heart, but they are very rare.
Regular check ups for the battery life are important, because when the battery is nearly out of power, some complications of heart rhythm may occur.
Best wishes!
Marija