Well, if you get sick or injured along the Inca Trail before reaching the Dead Womans Pass, your guide will assist you and take you way back to reach Ollantaytambo town. This can be done by a local porter or riding a horse. However, if you get sick or injured after the pass, they will carry on their back towards Machu Picchu or km 106 of the railway, where you can take the train to reach one of the closest towns. Keep in mind there is not any abulance access during this trek.