Soreness and tightness in your shins (aka "shin splints") can make every step along the trail painful. Bill Fabrocini, a sports-performance expert in Aspen, Colorado, suggests these exercises to strengthen and stretch the muscles you need for hiking long distances and up steep hills:
Train: Build up to hiking not only hills, but also long distances. Take the stairs instead of the elevator, and go for long walks.
Stretch and strengthen your calves: Stand with your heels hanging over the edge of a step (or a flat, stable rock or log on the trail), and push your heels down as much as possible. Slowly and gently raise and lower your heels a few times to work your calf muscles.
Stretch and strengthen your shins: Sit with your lower legs hanging freely. Hang something heavy, like an ankle weight, from your toes and raise and lower your foot, bending it at the ankle, two or three times. Next, remove the weight, lay one ankle on the opposite knee, and pull your toes back toward you (so your shin and foot are almost in a straight line). Hold and stretch the shin for 30 seconds, rest, then repeat several times.
On the trail, relieve shin pain by submerging your lower legs in a cold creek to reduce swelling. Stretch your shins and calf muscles, and minimize mileage and hills for the rest of the trip.