Bail out (someone)or bail (someone) out

To pay a sum of money that allows someone to leave jail while waiting for a trial.

The singer had to pay much money to bail himself out of prison.