If you're taken ill or have an accident abroad your travel insurance policy will repatriate you once you are well enough to travel.
It is included within your medical cover.
The insurance provider's Emergency Assistance team will help organise this along with the medical team who are treating you.
If you are travelling in the UK, check repatriation with your insurance provider to see what is included.