You have actually asked two questions:
1)If they are severely injured, they will be discharged and given to the VA for future determination of disability and care.
2)If its a minor injury, they can be put on "Medical Hold Profile" and kept until healed.
On the other hand, if someone screws up and wants out of the military they make life miserable for them. It can take 2 or 3 weeks before the paperwork is ready to ship the failure home.