The capital structure dominates much of finance and financial theory. The firm, being a fictional entity used to produce products that will provide profits, needs to be structured in a way that rewards initial investors according to their inputs as well as their appetites for risk. The capital structure is designed to do that.
The capital structure is usually seen as a pyramid (see here for more on this), with debt at the top and equity on the bottom. Within the debt are two major sections: senior debt and subordinated debt. Bonds are typically (but not always) a type of subordinated debt, which provide investors with an opportunity to invest in an entity for a long period of time and get a steady return, while also guaranteeing them from loss by having within the terms of the bond an agreement to have part of the entity as collateral.
There are three types of bonds most commonly used in financial markets around the world: government, municipal, and corporate. Government bonds are issued at the national or federal level, and provide investors with a way to invest in a country and get a steady return in the form of coupon payments (the income that creditors get by giving debtors debt).
Municipal bonds are very similar, except they are at the provincial or institutional level. Hospitals, towns, schools, regions, and states in the U.S. can all issue municipal bonds, which are not guaranteed at the national level (although the market tends to believe that these bonds will be bailed out by the government in extreme cases). Muni bonds, while popular in developed markets, are relatively underutilized in emerging markets.
Corporate bonds, on the other hand, are popular in EMs and are a focus of growth. These act the same way as municipal bonds, but are issued by private entitles. Anyone from Apple (AAPL) to a small private company can issue corporate bonds. They are essentially loans for companies, with a couple of important differences. For one, bonds typically have their principal paid at the end of the loan term and, secondly, these bonds can be traded on a secondary market much more easily than a loan can be resold.
The use of these bonds both for investors and for the entities that use them to raise capital are complex, and worthy of a separate discussion. However, it is important to keep in mind that each market is extremely different—and within them there will be even more minute differences. This is largely because many things influence bond pricing and rates, making them more mathematically and qualitatively complex than equities. Similarly, bond markets are much larger than equity markets, which mean they attract bigger and more sophisticated investors, making it a market that is very hard to compete in.