Start well in advance
A hike needs physical preparation for a few weeks! Plan your training well in time to be ready for the day you climb that hill. Systematic training includes breaking down your needs so you can focus on each regularly. Alternate between fitness and weight training, concentrating on the progress of each element.
If you have been away from the gym for a long time, it pays to start small, and with the basics. Cover your ankles and knees, since these are prone to most injuries during hikes. You will need to build motion in your body, so you know you are strong enough during your hike. Walk in the sand, stand on a tennis ball, do crunches, squats and lunges. These will also work your core muscles. Gradually move up to push-ups. A couple of weeks into your strength training, start using your hiking shoes during sessions to get your feet used to them.
Overall strength training
You need to develop core strength to take on a hike. Overall fitness matters, but you need to conquer the train with your strength. Once you get on a training schedule, try to incorporate strength training exercises for the body, including core, back, arms and legs. You can do mountain climbers, twists, a variety of planks (basic, forearm, side), and squats.
Apart from strength and cardiovascular exercises, you have to work on improving your balance. This includes being prepared to climb, walking on uneven trails and preparedness to react to any sudden movements. Standing on one leg for 30 seconds alternately will help. Lift your other leg only six to 12 inches above the ground. Jump squats help with training the legs.
Start with the basics, and then incorporate cardio—jog, run, swim, cycle—just get your heart pumping. Apart from the treadmill and stationary cycle in the gym, after a few days, you can start walking up and down the stairs in your building for this workout. You need to ensure that you heart rate goes up substantially during the session. It will also help build lung capacity. You need to put in at least 45 to 60 minutes of cardio three times a week.
Increase the intensity of your exercises and workouts a few weeks into the plan to improve physical endurance levels. Once you are all set in a few weeks, grab your backpack, wear your shoes and go conquer the hills!