A yield curve is an illustration of the current duration-to-yield relationship for bonds of the same credit rating but different durations.
As a general rule, the longer the duration of the loan, the more risk you take on (since you don't know what might happen with that corporation in the future), and therefore, you demand a higher reward (i.e., higher coupon). The yield curve for any bond (not just the US Treasury Bonds) changes daily based on many economic and market factors.
Yield curves normally slope up and to the right, when longer duration bonds have higher yields than shorter duration ones. But there is such thing as an inverted yield curve, which slopes down to the right, and is an indicator of a possible recession.
Higher demand for the security of long term bonds causes the price of longer-duration bonds to rise, which causes their yields to drop. After all, if the demand is high, it does not require as much yield to entice investors. This is quite rare, but it does come up in discussions of yield curves.
Once again, it is important to do thorough research before investing.
What is Bond Yield?
What is Yield to Maturity?
What does Market Risk Premium mean?