Cardiopulmonary resuscitation (CPR) is an emergency procedure performed when someone goes into cardiac arrest that pushes blood out of the heart by compressing the chest to restore oxygen to the lungs. Defibrillation uses electric shocks from a defibrillator to convert serious irregular heartbeats like fibrillation and help establish a normal rhythm, while pacemakers are implantable devices that control heartbeats electrically to treat arrhythmias. Heart transplantation replaces a diseased heart with a donor heart through surgery for patients who have not responded to other treatments and are at risk of death.