First and foremost, the bond yield curve has a close relationship with the term structure of interest rates, to be more specific, the yield curve in some sense indicates how interest rates vary over investment horizons. Additionally, it can also be a useful tool for interpreting the market expectation of interest rate.
In terms of the yield curve graph that we normally apply with, is basically a line that plots the interest rates, at a set point in time, of bonds having equal credit quality but differing maturity dates. As you can see from the graph below, the yield curve is typically upward sloping but can also be flat or downward sloping (i.e. inverted)

Types of Yield Curve
There are two main types of yield curve are mainly used which are pure yield curve and on-the-run yield curve. Pure yield curve is constituted by the yield of a series of spot rate, in other words, the yield shown in this curve stands for the yield of zero-coupon bond in different time horizon. However, in reality it may be difficult to derive the pure yield curve, as relevant zeros may not be available in the market.
In contrast to the pure yield curve, on-the-run yield curve is significantly differing as it uses the yield of recently issued coupon bonds which selling at or near par. In addition to that, since on-the-run bonds generally have the greatest liquidity in the market, the financial press typically tend to publishes on-the-run yield curves.

Theories about Yield Curve Sloping
As mentioned, the yield curve not only display the relationship between yield and maturity, but also imply market expectations on future interest rates. Especially, the vary of investors’ time horizon may become a decisive factor of different sloping of yield curve.
The Liquidity Preference Hypothesis is one of the theories that particularly explained the reason for upward sloping of a yield curve. It suggests that an investor demands a higher interest rate or premium on securities with long-term maturities that carry greater risk because, all other factors being equal, investors prefer cash or other highly liquid holdings.
According to the liquidity preference theory, interest rates on short-term securities are lower than medium or longer-term securities and hence results in the upward trend of a yield curve. On the other hand, a downward yield curve sloping can be interpreted by the reinvestment risk. In this case, reinvestment risk can be referred to the probability that an investor will be unable to reinvest cash flows (e.g., coupon payments) at a rate comparable to the current investment’s rate of return. As a result, investors with long term horizons dominate may require a discount for short term investments to avert reinvestment risk and therefore a downward yield curve is likely to form.