Exercise actually begins on the afternoon of surgery — you must be out of bed and walking. The goal is to walk even more the next day and progressively more every day after that, including the first few weeks at home.
You are often released from medical restrictions and encouraged to begin exercising about two weeks after surgery. You are limited only by the level of wound discomfort.
The type of exercise is dictated by your overall condition. You may have severe knee problems and can't walk well, but you are able to swim or bicycle. You will likely begin with low-stress forms of exercise and are encouraged to progress to more vigorous activity when they are able.