If you want to become fit and use exercise to help prevent a heart attack, first check with your doctor to make sure that you do not have anything wrong with your heart or blood vessels. Intense exercise can increase your risk for a heart attack if you already have a damaged heart.
Pick any sport or activity that uses continuous motion (such as running, cycling, swimming, skating, rowing, pickleball, dancing) that you think you might enjoy. Start out at a relaxed pace until your muscles feel heavy and then stop. For the first several days or weeks you may be able to exercise only for a few minutes. If your muscles feel sore the next day, take the day off. Increase the amount of time gradually until you can exercise 30 minutes a day at a relaxed pace and not feel sore. Then you are ready to begin your training for fitness. Try to increase the intensity of your exercise once a week. Do your jogging, cycling or whatever you have chosen as your sport at a slow pace to warm up. Then gradually increase the pace until you start to feel short of breath and your muscles start to feel sore, and then slow down. Then when you recover, pick up the pace again. Repeat these surges until your muscles start to stiffen and then quit for the day. Take the next day off and go easy the rest of the week. Then once a week, keep on making your one-day-a-week hard workout harder and harder. You will be continuously increasing your level of fitness.
The only way to strengthen any muscle is to contract the muscle against increasingly greater resistance. Your heart is a muscle, so the only way to make your heart stronger is to contract it against greater resistance. When you exercise, you alternately contract and relax your skeletal muscles. This alternate contraction and relaxation squeezes the veins near the muscles to pump blood toward the heart. Your heart is muscular balloon. The increased flow of blood returning to your heart goes inside the heart to stretch the balloon and the heart has to contract with greater force to pump the blood from inside the heart toward the body. The increased amount of blood inside the heart stretches the heart muscle to make it stronger.
The harder you contract your skeletal muscles, the more blood you pump toward your heart, the greater the stretch on the heart to make it stronger. So fitness is determined more by how hard you exercise than by how much you exercise because the harder you exercise, the stronger your heart muscle becomes. Going out and running 100 miles a week slowly does not make you very fit because you are not strengthening your heart very much with a little increase in circulation of blood, no matter how long you do it. Compare lifting a very light weight a thousand times in a row to lifting a very heavy weight 10 times in a row. The person lifting the heavy weight 10 times will become stronger than the person lifting a light weight a thousand times.
Caution: Exercise can cause a heart attack in a person who has blocked arteries or heart damage. Check with your doctor before you start a new exercise program.