What is the best way to build running mileage while avoiding injury?

Gradual buildup. A gradual increase in mileage and intensity combined with adequate rest, nutrition and cross-training will go a long way in injury prevention.
Increase <10%/week. Gradually increasing mileage is the best way to reduce your risk of injury. A good rule of thumb is to avoid increasing your weekly mileage and the distance of your longest run during the week by more than 10% from the previous week. You should also avoid increasing distance and intensity at the same (e.g. Don't add hill or interval workouts in a week that you increase your mileage or long run).
Baby steps. Possibly go to a track (inside or outside,) and start by possibly walking 2 laps, then jog one and gradually add more running laps.