They are distinct but overlapping categories.
Mortgage-backed Securities (MBS): any kind of asset-backed security where the underlying assets are mortgages. May have one class (tranche), as in the case of pass-through securities, or many classes.
Collateralized Debt Obligations (CDO): the underlying assets can be any kind of debt (bonds, mortgages, even other ABS). Always has multiple tranches with different priority of payments.
An MBS with a CDO-like structure is called a CMO (collateralized morgage obligation). There is a big difference in the typical purpose of CMOs vs other CDOs though:
- CDOs are mainly about apportioning credit risk -- the low-priority tranches buffer the high-priority tranches from the risk that some
underlying credits will default.
- CMOs, on the other hand, are largely about apportioning prepayment risk. Unlike most other kinds of debt, mortgages usually give the borrower the right to repay early. Early repayment is usually a bad thing from the point of view of the mortgage note holder. In CMOs, the lower tranches get repaid first.
Also note that while it's technically correct to say that CMOs are a type of CDOs, it's not very common. Saying something like "the bank trades CMOs and other CDOs" is a bit like saying "I saw my sister and several other animals at the zoo yesterday" – technically not wrong, but a bit weird.