Hills can be done multiple ways. For more information, you can check my post about hills. There are many ways to do hills. The main purpose of hills are to gain power, work on your running mechanics, and improve leg drive and running form. I will suggest two types of hill runs that can help you for any race distance.
The first is a “simple workout”, where you find a hilly route and just run it. Your goal is to run the hills just slightly quicker or more aggressive than your normal pace and then get back to your normal pace on the down hills and flats. Think of this type of workout as a fartlek (Swiss word for pace changing). This type of run should include short, steep hills and long, “grind-it-out” hills. Remember, when doing this type of workout that you have a proper warm up and cool down. This run should be anywhere from 6 miles up to 10 or more miles depending on your weekly mileage.
The other hill workout I would recommend is hill repeats. One type of hill repeat would be short hills that are relatively steep. These workouts should be quick (in pace) and relatively intense. In a workout of this nature, you’ll want to work on speed, power, and foot placement (landing on the ball of your foot and driving your knee). Depending on your ability, the length/steepness of the hill, and your goal for the workout, will determine how many repeats you do. Generally speaking, 6-10 repeats of 300-400 meters will simulate repeat 400s or 800s, whereas shorter length hills will simulate sprint type efforts.
Remember, the longer and faster you run hills, the more recovery you’ll typically need between repetitions and potentially even between days before your next workout.