Try taking the bus or train to school for a week. Wearing good shoes when you walk, and stretching your legs in an effective flexibility program before your walks, can help prevent the problem from getting worse or recurring. Because you're walking on pavement, make sure the shoes have adequate cushioning. The shape of the shoe should correspond to the shape of your foot, without areas of pressure or pain, or a feeling of binding. Solicit advice from friends and from a few specialty stores about what brands and styles are best.
Flexibility exercises help to reduce muscle soreness and the chance of injury.
Examples of simple exercises are the Sitting Heel-Cord Stretch, where you sit on the floor with one leg extended and the opposite leg bent with the foot against the inside of the thigh. Hook a towel around the ball of the foot and pull the toes towards the knee. Keep your knee straight, and repeat ten times for each leg. Or, try the Lying Knee-Pull, where you lie on your back with your legs extended and bring your left knee to your chest, grabbing just under your knee with both hands. Pull until you feel the stretch, and hold for 10 seconds.