Different types of exercise achieve different goals. Check with your doctor or physical therapist first and then begin a regular exercise program for your specific needs. If you can walk, walking is a good starter exercise. If you can't walk, try a stationary bicycle with no resistance or do hand or arm exercise. A chair exercise program may be helpful.
Aquatic exercise is another option, and many health clubs with pools offer such classes.
It's good to move each joint in its full range of motion every day. As you move, maintain a slow, steady rhythm. Don't jerk or bounce. Also, remember to breathe. Holding your breath can temporarily deprive your muscles of oxygen and tire them.