One of the dangers of investing in a long-term bond is the potential for it to lose value before it comes due. When you buy a bond, you're essentially lending an entity (such as a company or municipality) money in exchange for regular interest payments. The bond issuer is obligated to pay you interest until your bond matures, at which point the issuer must return your principal as well.
If you invest in a bond with a two-year maturity date, then you'll get your principal back in two years if all goes according to plan. On the other hand, if you invest in a 30-year bond, you'll need to wait 30 years before your principal is repaid. Because a lot can happen over the course of 30 years, investing in a 30-year bond is riskier than investing in a shorter-term bond, all other things (like credit rating) being equal.