Today I did some First Aid and CPR training, through my work. It was just the one-day course so counts as "Emergency First Aid and CPR" though in an emergency who knows how effective I will be. It was good to learn, it has been a long time since my St. Johns Ambulance Babysitting Course and the various swimming lessons that focused on Artificial Respiration techniques (mouth-to-mouth resuscitation.) A lot has changed!
The course did a big section on when and how to use am AED (Automated External Defibrillator). These machines are now available in a lot of public spaces (libraries, schools, large malls, etc). They are really easy to use and combined with CPR can increase the likelihood of survival by 75%.
BUT, they are not used to start a stopped heart (asystole.) So when we see a 'flat line' on the heart monitor, and actors in a show or movie revive someone by administering a 'shock' the patient using a defibrillator - this would not work. A defibrillator is used in two cases: trachycardia and fibrillation. These are cases of life-threatening cardiac arrhythmia, or irregular heartbeat. In each other these the heart is electrically active but the dysfunctional pattern of the heartbeat does not allow for adequate circulation and pumping of blood. An electric shock from the AED can stop the heart and allow it to reestablish an effective rhythm.
However, a heart in 'flat line' cannot be shocked to restart - movies and TV have been doing it wrong.