Professional indemnity policies commonly provide that the insurer will pay the legal costs of the defence.
When a professional faces a legal claim, their professional indemnity insurance may cover the costs of defending themselves in court.