An implantable cardioverter defibrillator, or ICD, is a battery powered device that keeps track of your heartbeat and can deliver an electrical shock that will allow ventricular muscle fibrillation to return to a normal heartbeat.
The ICD can detect irregular heart rhythms called arrhythmias in the ventricles. When the ICD detects a dangerous arrhythmia, such as ventricular fibrillation, it sends a strong electrical impulse that shocks your heart out of the dangerous rhythm and allows normal rhythms to resume.