Depends on the airline and the contract.
I am bonded to the airline for the TR for 2 years and £12k (total cost is £18k but the airline absorbs the rest). This decreases by 1/24th for each month you serve. Only liable for it if you leave on your own or get fired - gets written off if they make you redundant.
Also getting tax free repayments to pay off my loan for 7 years. My loan from the bank, nothing to do with the airline, but similar deal in the contract. If I leave, it's my problem, if they make me redundant, they keep paying me the allowance for the loan repayment.
I agree with RSinha - speculate to accumulate. Always better to have a conditional offer when you take the loan out than none!