There is no substitution for hiking when it comes to getting yourself in the best condition you can so that you will enjoy your hiking experience. Even if you exercise on a regular basis, hiking is completely different from many of the exercises that you currently do. If you don't exercise on a regular basis, then you have to start very slowly... but you can be ready in a short period of time.
Around The Block:
Start by just taking a walk around your block for an hour each day just to get your legs used to moving and walking. Any form of exercise, even at a slow pace, will be helpful.
Up And Down The Stairs:
If you have a treadmill at home, belong to the gym or just have stairs in your home, you need an incline to strengthen your leg muscles (and at the same time get used to inclines). Wear your backpack and slowly fill the backpack to amount of weight that will approximately be with you on your hike.
Ride A Bike:
If you have a bike, start riding your bike for distance and for your aerobic needs.
Take Short Hikes:
Start taking short hikes that have some elevation and wear your backpack. Take it slow at first and you will be surprised how fast your legs and lungs respond to the challenge. Your capacity will improve extremely fast.
Do Something Every Day:
You don't have to do anything hard each day, just do something. You will get ready sooner if you don't miss a day and if you mix easy with harder to keep your muscles in top shape.
Take A Harder Challenge:
Take a 4-5 hour hike near your home (with some elevation) and keep your pace up to get your aerobic needs.
Even if you only have 5 pound weights, do more reps with lighter weight. The constant use of your arm and upper body muscles will help you during your hike. All muscle groups must be used and in shape.
Park & Walk:
Park farther away in the parking lot from work and walk a little farther. Walk up the stairs instead of using the elevator.
Do as much as you can do and don't overdo. You don't want to strain or hurt any muscles as that will only put you behind schedule. Take it slow and easy and be patient.
Higher Altitude & Thin Air:
If you are going to hike where the air is thin (due to altitude over 6,000'), there is really no preparation that can be done for high altitude. Just keep in mind that your hiking will be a little harder in the beginning and you will proceed slower. But you will get used to the thin air very quickly.
I got ready to hike out west by just hiking locally around my hometown. There are only hills (only about 500-1,000 feet elevation). But, by taking it easy, taking an hour walk each day around the block, lifting light weights (5 pounds), I was able to average about 8-10 miles each day hiking in the National Parks and sometimes climbing up to 13,500' with 4,000' elevation gains. If you start slow and don't overdo, you will be conditioned to hike.