How does an implantable cardioverter defibrillator work?
An ICD is a small device implanted in your chest, under the skin, that keeps track of your heart rate.
ICDs are a suitable treatment option for people who suffer from a recurrent irregular heartbeat (arrhythmia). Sometimes this condition can be kept under control with medicine, but when these medicines don't work, an ICD implant may be the right solution.
The ICD device consists of two parts:
The device keeps track of your heart rate, if it detects an irregular heartbeat, it sends out a short burst of electrical impulses to your heart.
If the heart does not restore its normal heartbeat, the device shocks the heart to restore a normal heart rhythm. The ICD also records information about the event such as time and date and other data that helps your doctor optimize the device for your needs.
Source: https://www.cedars-sinai.edu/