No, a heart does not necessarily stop beating during cardiac arrest. Cardiac arrest occurs any tine the heart cannot pump blood to the brain at a rate/volume sufficient for the patient to remain conscious.
From your second link:
To understand SCA [sudden cardiac arrest], it helps to understand how the heart works. The heart has an electrical system that controls the rate and rhythm of the heartbeat. Problems with the heart's electrical system can cause irregular heartbeats called arrhythmias.
There are many types of arrhythmias. During an arrhythmia, the heart can beat too fast, too slow, or with an irregular rhythm. Some arrhythmias can cause the heart to stop pumping blood to the body—these arrhythmias cause SCA. [emphasis mine]
A patient can be in ventricular tachycardia (VT or Vtach) and still be awake. If they are, they are in Vtach, and treated as such. If their Vtach is in fact enough to cause compromised flow to the brain and the patient passed out, it's a cardiac arrest.
Congestive heart failure is a different animal.
The heart has cells which are supposed to fire synchronously. This is what allows the heart to pump effectively. Tachycardia means too fast, and if it's too fast, the ventricles can't fill enough to pump effective amounts to the brain. Fibrillation ("VFib") is when the cardiac cells which have some "pacemaker" activity are firing asynchronously, which means blood isn't getting pumped. The heart may not be beating in an organized fashion, but it's not at a standstill.
Administering a shock causes all of the units to fire at once (which causes a temporary asystole), in the hopes that when electrical activity resumes (after giving a shock, we wait and look at the monitor to see if there is a regular heart beat, we do not start CPR unless there is not), it will do so in an orderly, synchronous manner.
In asystole (flat line), there is no longer any effective electrical activity of the heart. There is basically no disorganized electrical activity to try to reset with a shock.
That is why it makes no sense to shock someone in asystole. On television, people in flatline are shocked into a stable sinus rhythm. That just doesn't happen in real life. Neither does a deep breath and fluttering open of eyelids, as often shown on television when someone arrests and resuscitation is successful.
Asystole @ Medscape.com
Treatment of Asystole @ Medscape.com