Cardioversion is a medical procedure used to restore a normal heart rhythm in patients experiencing abnormal heart rhythms, such as atrial fibrillation (AFib) or atrial flutter. The procedure can be performed using electrical shocks or medications. Electrical cardioversion involves delivering a controlled electric shock to the heart through electrodes placed on the chest. This shock interrupts the abnormal electrical activity and allows the heart to resume its normal rhythm.