My mom had a defibrillator put in a couple months ago. Basically it monitors the heart rythym, and if it senses a fast or dangerous rythym, it will send a shock to get the heart back into a normal rythym. If you do a search on this board for "defibrillator," you'll be able to find other posts about them and people with personal experience.
As a family member, one of the things I wish the docs had told us is that it can take some time to adjust the settings correctly to the individual. So, when my mom went into afib, the defibrillator started shocking her full power and we thought she was having another cardiac arrest. Turns out, the defibrillator can't tell the difference between afib and vfib, just a fast rythym. She doesn't have a lead to her atrium, so the shocks were inappropriate. Anyway, they've adjusted her settings and meds and things are looking good. Just wanted to pass on that they may have to make some adjustments to customize the device to your mom's particular rythym, which is perfectly normal. Your mom is much safer now with the device than without.