Its easy to think of it this way... a heart attack
is when the hearts "plumbing " has a fault...ie a clot or something blocks the blood supply to your heart. Your heart still beats with a heart attack but one area will not be getting blood and that area can be damaged permanently.
A Cardiac Arrest
happens because of an "electrical" issue when the beating of your heart has a problem. The rhythm will go crazy/wrong and then all activity in your heart stops...thats when you need CPR and defibrillators to get it working again. If you are not defibrillated within 5-10 minutes your survival chances are pretty poor.