Depending on the difficulty level of the hike for you will dictate how much you need to integrate more strength work or aerobic activity. In general, you need to do both to help avoid injuries and enjoy your hike. Hiking long requires more aerobic base, hiking steep requires more leg strength and muscular endurance and thus requires more strength training.