Collateral is a lender's protection against the borrower defaulting. Collateral gets used to offset the loan if the borrower fails to pay the principal and interest according to the lending agreement's terms.
A familiar use of collateral involves a mortgage. If a borrower gets accepted for a mortgage, the lender will insist on the home as collateral. If the borrower defaults on their payments to the secured lender under the loan terms, the secured lender can foreclose on the collateral and try to sell it to recover the loan amount.