1. you borrow stuff you dont own so you can trade with it, giving a collateral.
2. if your "investmet" is going the wrong way, bank or exchange will liquidate you, selling you assets at the time they are worth what you borrowed, so the lenders dont lose anything, but you lose all.