The legal position
Overdrafts are on-demand facilities. The bank can withdraw the facility at any time, requiring you to repay the balance.
This is different from a loan or credit card where the term is fixed. An overdraft is legally more precarious.
In practice
Banks rarely withdraw overdrafts without cause. The usual triggers are: persistent over-limit use, missed payments on associated accounts, being flagged by internal risk systems, or entering formal debt solutions.
When a bank withdraws an overdraft, they typically give notice (30-90 days is common) and offer to convert the balance to a loan.
What happens if you cannot repay
If you cannot repay when demanded, the bank will default the account and pass it to their collections department. It then becomes an unsecured debt like any other.
This will result in a default marker on your credit file and, depending on the balance, potentially court action or debt collection.
If you go into a formal debt solution
IVAs, DROs and bankruptcy will normally result in the overdraft being called in and the account closed. Any overdraft debt becomes an unsecured claim in the solution.
This is why people entering formal solutions are often advised to open a basic bank account with a different bank first.