Lending and interest rates
Yes. That's tricky for newcomers to figure out. The concepts to keep in mind are:

a) to buy a bond is essentially to lend to the bond issuer

and

b) bonds are tradable.

So let's say that, in 2010, you bought a 30-year bond at \$10,000 face value that was yielding a 5% rate (known as the coupon rate) and today, in 2020, a 20-year bond is being issued also at \$10,000 par value but only offers a 4% return ($400 annual coupon).

Because bonds are tradable, that means your 30-year bond with 20 years remaining and an annual coupon of \$500 should now have buyers willing to pay a bit more than the $10,000 you paid for it.

Specifically, they can pay up to around $1.135 and still get the equivalent yield to maturity as the newly issued 20-year bond, a 13.5% profit for you.

The reverse also applies. If your 2010 30-year bond had a 4% coupon and the 2020 20-year bond is yielding 5%, you would only be able to sell the 2010 today at a price lower than $10,000.