Listen to your body! No matter the workout you have scheduled to do and no matter the race you are trying to complete, if your body is telling you to stop or slow down because of pain it would be wise to listen. Pain means you are on the way or already in the state of injury. Injury means you need recovery and injury recovery requires time.
Now that you have stopped and rested, gradually increase workout intensity, frequency, or distance of the walk/run. This may be the most frustrating part as your patience in this process is running thin, but being wise in this stage will allow a healthy return to activity. Important to remember is that cross-training during this time can keep your conditioning where it needs to be. Examples of good cross- training for foot and ankle injuries are weight lifting, swimming, cycling, and yoga.
Now that you are healed preventing further injury may require looking at your shoe choices, orthotic fit and wear, evaluating running surfaces/inclines, and having a good stretching regimen.
Stay active and injury free!