Legally it is a sale and repurchase; economically it is a loan against collateral. The cash borrower hands over Treasuries and receives cash; the difference between the sale price and the repurchase price is the interest, quoted as the repo rate.
Repo is the plumbing of the bond market. It is how dealers finance inventory, how leveraged funds fund the carry-fixed-income trade, and where sofr comes from. When repo rates spike, something in the funding system is stressed.
Example: a dealer repos $100,000,000 of Treasuries overnight at 5.32%. It receives $100,000,000 today and repays $100,000,000 x (1 + 0.0532 x 1/360) = $100,014,778 tomorrow, a cost of $14,778.
Related: reverse-repo, haircut, collateral, sofr, standing-repo-facility