Collateralized Debt Obligation (CDO) is a financial product that combines cash flows generated from different underlying loans or debts secured by collaterals and packaged into different tranches in order to sell to different investors or funds. The tranches in a CDO have different risk level which is mapped with the risk appetite of various investors. Investors pick up the appropriate tranches for investment based on their risk parameters and suitability.
The senior tranches are relatively safer because they have first priority on the collateral in the event of default which means they have higher credit rating as well. For junior tranches, risk is higher and credit rating is lower as they carry higher default risk.
The below diagram shows basic flow of CDO with different entities and flow of funds.
CDOs were very popular investment vehicles in USA housing market before the financial crisis in 2008. Lots of investors invested in CDOs which provided money to the investment banks for more lending to home loan borrowers, specially subprime borrowers. This caused the bubble to form which triggered US housing price correction and sub-prime crisis leading to worst financial crisis in recent times.