When your heart stops beating you do not die instantly and can usually be revived as long as you get CPR or other medical attention to get your heart restarted.
If you don't get your heart restarted within 6 minutes then it's very unlikely that you will survive once your heart stops.
But there have been miracles and when someone gets there heart restarted by a medical professional using medical equipment then they can live.
But it's important to get the heart started up again really quick because the longer you wait the less chance you have at surviving and your brain can suffer brain damage if you do survive.
Once a persons heart stops beating the person has about 6 minutes to get the heart started again before it leads to brain damage and possible brain death.
When your heart stops beating you stop getting oxygen and blood to your brain and without the oxygen and blood going to your brain and circulating through your body your brain cells begin to die.
If you don't get your heart started again within 7 to 10 minutes then you will usually die.
So it's very important to get medical attention for someone who has a heart attack and there heart has stopped.
You should immediately begin CPR and have someone else call 911 if possible but if not you should dial 911 and begin immediately doing CPR.
Keep doing CPR until the medical help arrives.
If possible get a defibrillator for home and get trained to use it because it could save a life.