Where a person who has been given leave outside the rules but is unable to return home they should apply for an extension of leave. Further information about applying for an extension can be found at https://www.gov.uk/government/publications/application-to-extend-stay-in-the-uk-flrhro.
Each case will be assessed on its merits. If they are unable to afford the fee then a fee waiver application can be made. Details about fee waivers can be found at: https://visas-immigration.service.gov.uk/product/fee-waiver.