Hills are a great way to build strength in your legs especially when prepping for a marathon. A hill training program that I prefer to do is on the treadmill. Instead of doing hard short bursts uphill, which can tire one out very quickly and end up leading to poor running form, I will set the treadmill to a 5% grad and run for 20-30 minutes. This is best performed after a long run or tempo day when legs are tire. It will help prepare the strength you will need for a marathon.
When Allie Ostrander reached the final leg of the 2014 Nike Cross Nationals last December, she blazed over a series of hills and crossed the finish line of the 5K course in 17:19 to earn the individual title.The Alaskan native had her hometown hills—part of her strategic summer training regimen—to thank. They conditioned her to power through the short, steep inclines in the race’s final 1K.
Source: Peak Training: Summer Hills | Runner’s World