An inverted yield curve occurs when long-term treasuries have a lower yield than short-term treasuries. Normally, investors would not be interested in a such an arrangement and the yields would have to come up to generate some demand.
However, if investor sentiment is bearish enough on bonds, they will seek to avoid the interest rate risk of short-term bonds, which will expire sooner and leave them unable to find a good rate at that point potentially. Investors with that mindset will pile on demand for long-term bonds, which drives the price up and the yields down.
When investors continue to do so, the yield curve will become inverted, and it is widely considered to be a strong signal of a recession, since investors are avoiding risk assets and there is a flight to safety.