On protocols like Aave, lenders deposit tokens and earn interest; borrowers lock more collateral than they borrow. If the collateral's value drops too far, it is liquidated automatically.
People borrow to avoid selling (and a possible tax event), to get leverage, or to farm yield.