Build up your leg strength with weight training. The four major muscle groups involved in running hills are your quadriceps, hamstrings, glutes and calf muscles. Rather than work these muscles in isolation, you can exercise them all at once with compound lower-body exercises such as squats and deadlifts. These exercises also help you build up the smaller stabilizer muscles around your knee, ankle and hip joints, which are put under tremendous strain when running hills.
Build up your flexibility, balance and fitness with body-weight exercises. Exercises such as lunges, jump squats, box jumps, calf raises and one-leg squats all work to build up the strength and flexibility of your leg muscles, while also improving your balance and control. While running hills, you will often have to make quick adjustments to your stride to avoid, step over or step around obstacles such as branches, large rocks and holes, and these body-weight exercises prepare your legs for rapid or unexpected adjustments.
Perform short hill sprints to build up your strength and running technique. There is no substitute for running up and down actual hills when you're training, but if you don't live in an area with hilly trails, you can also run up and down stadium steps or building staircases. As you run, focus on your weak areas, whether that be your push off, elevating your knees as you run uphill, or adjusting your stride as you run downhill.