Flattening of the yield curve occurs when the interest rates on both long- and short-term investments become more similar to each other. In a normal market, the shorter the term of an investment, the lower its interest rate, or yield, will be. Flattening of the yield curve typically indicates some form of economic trouble, including impending recession.
A bond yield is its effective interest rate, based wherever the bond trades on the open market. Although bonds typically carry a fixed interest rate, called a coupon rate, which remains fixed until their maturity, the actual yield on the bond fluctuates as the trading price of the bond shifts depending on the whims of the market. When the market likes a bond, traders will pay more than its face value, reducing their effective interest rate. Conversely, if traders have a negative opinion of a bond, they will trade its price down, effectively increasing the interest rate, or yield.
Typically, short-term bonds carry significantly lower interest rates than long-term bonds. This happens because investors who buy bonds generally face less risk on short-term investments. With a short-term investment, investors get their money back sooner, reducing the risk that they will not be paid back. In addition, because the investment occurs over a short period of time, there is less exposure to inflation and to the risk of increased future inflation.
Flattening of the yield curve typically refers to government treasury bonds of high quality, such as those issued by the US government, which are the world's standard. These highly-rated bonds typically offer some of the lowest yields of any investments available, with short term bonds offering the lowest returns. When the economy takes a bad turn, though, investors tend to shift their money into extremely safe investments. Increasing demand bids increases prices and reduces yields.
The initial effect of this flood of capital into bonds is to lower interest rates on short-term bonds. In time of economic uncertainty, every investment becomes suspect. As investors who are less risk averse move out of lower-rated bonds, stocks, and other investments, they move into long-term high-quality bonds. This increased demand moves those bonds' interest rates down, making the interest rates on all bonds lower, causing the flattening of the yield curve.