Just like an exercise program you need to train for a long hike. If you don't train, the hike will be harder than you imagine. Hiking is more than just taking a walk. It's a physical activity that requires certain muscle groups that need to train for the sport.
If you already have a work out routine, then you can consider a hike as cross training.
A couple of preparations to keep in mind before you hike:
Get your hips and shoulders in shape for packing a load. Gradually add more weight to your pack or backpack. It depends on how far you are hiking and how much you plan on taking.
Make sure your feet, legs and lungs are ready for the hike. Increase your walking and physical exercise routine a couple of weeks before the big hike.
A good way to prepare for hikes and still be in nature is walking or jogging along the beach. Close to the water the sand is wet and packed and feels somewhat sturdy against your feet, but you're still getting an incredible leg workout.