"A bond is a debt security, similar to an IOU" (Investor.gov). When you buy one, you're the lender. Investor.gov explains that the issuer "may be a government, municipality, or corporation."
In return, the issuer promises to pay a set rate of interest during the life of the bond and to repay the principal, also called face value or par value, when the bond "matures," or comes due.
For example, a $1,000 bond that pays 4% a year pays $40 of interest each year. When it matures, the $1,000 is repaid.
Bonds are one of the main kinds of investments, along with stocks and cash. Because they work differently from stocks, investors often hold both as part of diversification.