The waterfall runs roughly: super-senior and secured debt, senior unsecured, subordinated, hybrid and preferred, then common equity. Each layer is only paid once the layer above is made whole, which is why recovery-rate varies so sharply by rank.
Structural seniority is a separate and often overlooked wrinkle. Debt at an operating subsidiary sits closer to the assets than debt at the holding company, so holdco bonds can recover less than opco bonds with the same formal ranking.
Example: a company defaults with $600 million of enterprise value, $400 million of secured loans and $400 million of senior unsecured bonds. Loans recover 100 cents, bonds recover $200m / $400m = 50 cents, and equity is wiped out.
Related: capital-structure, subordinated-debt, recovery-rate, covenant, collateral