Defibrillators are machines that shock or pulse an electric current into the heart to get it beating normally again. They are used to prevent or treat an irregular heartbeat that beats too slowly or too quickly, called arrhythmia. Defibrillators can also restart an abruptly stopped heart.