The market bids on these bonds, and the market price is public information. Let's say that people are paying $90 for a 5 year bond, meaning they pay $90 today and get $100 in 5 years. Knowing this, we can work out that this is equivalent to a yearly interest rate of 2.13%.
Now we expect that the computed interest rate for the 10 year bond should be higher than the 5 year bond. People want to be compensated for locking up their money for longer. So let's also say people are paying $80 for a 10 year bond, which works out to an interest rate of 2.26%.
These numbers fluctuate up and down every day, and they generally rise and fall with the prevailing interest rates. Here's the key question - what happens if the 10 year interest rate falls below the 5 year rate?
There are a lot of possible reasons, but this often indicates that investors think a recession is around the corner. The reason is that investors are betting that the prevailing interest rates will drop. If interest rates drop, then future bond purchases may have much lower interest rates than those bought today. It turns out you might like the idea of getting 2% interest for 10 years rather than 2.13% for 5 years and then 0.5% for the next 5 years.