You can start right away! You should start walking while in the hospital, with a goal to slowly build up your daily activity levels over the next 4-6 weeks while your incisions heal and your body continues to recover. Once you get cleared by your doctor (usually 4-6 weeks after surgery) you should start to implement strength training 2-3 days/week using a combination of body weight exercises, resistance bands, and free weights. It’s important to stay active aerobically as well, aiming for 2-3 days/week of light-moderate intensity aerobic activity (ex: running, biking, swimming, dancing, etc.)
If you are experiencing severe joint pain/discomfort, you should seek professional help from those qualified to assist you with those issues (ex: physical therapist, orthopedic surgeon, etc.). If you feel like your symptoms are mild enough to try and work through, body weight exercises and resistance bands can be great resources to use to help alleviate some of the pain and improve some of those painful areas.
This will vary from person-to-person depending on their financial flexibility, their ability to do things on their own and hold themselves accountable, and their personal preferences. Some people do okay with at-home workouts, whereas others have greater success in a gym, away from distractions (ex: televisions, ringing phones, etc.). It’s a matter of what works best for YOU. Gyms are great in that they provide the resources (equipment, trainers) that can help you successfully reach your goals. Some people do great at home, as home workouts cut out the extra time required to commute to and from the gym and don’t require a membership, making this option more cost-friendly.
It is important to remember that your weight loss journey will not be perfectly linear. Your body is an amazing machine and it can be hard to determine why we lose weight quicker at certain points and more slowly at others. Try to add variety to your workouts in an effort to keep your body from adjusting to the same stimulus being placed on it day after day. Aim for a balance of aerobic activity, strength training and flexibility/mobility work.