If you haven’t been active in several years, start out slow. Always talk to your doctor before starting an exercise program, as there may be precautions you should take.
In general, you’ll want to start out with sessions of only five or 10 minutes. You can gradually increase the length of your sessions over time.