A dealer sells $100 million of treasuries and agrees to repurchase them tomorrow for $100,012,000. The difference is the interest, expressed as a repo rate. Legally it is a sale and repurchase, which matters enormously in a bankruptcy because the lender can simply keep and sell the securities.
Repo is the funding backbone of bond markets and the mechanism through which central banks implement policy. It also transmits stress rapidly: when lenders raise haircuts or refuse certain collateral, leveraged holders must sell, which is the run dynamic that hit dealers in 2008.
The collateral's quality determines the rate and the haircut. Specific securities in high demand can trade special, with the borrower of that security paying a much lower rate. See reverse-repurchase-agreement.
Related: reverse-repurchase-agreement, haircut, collateral, money-market-fund, mortgage-reit, federal-funds-rate