When many different sources of capital are involved in financing a company, some sources are senior to others, which means that if things go wrong and the company is in bankruptcy or sold at a low price, the senior sources of capital get paid ahead of the more junior sources of capital.
Most simply, according to US laws debt is senior to equity, which means that if things go wrong debt must be repaid before equity owners get any residual.
Secured debt holders are senior to unsecured debt holders, which means (for example) if a customer or distributor of yours goes bankrupt, their banks with secured loans get paid before any of your accounts receivable get paid.
Some debt suppliers are willing to not be senior in return for higher interest rates (more risk equals more potential return). The fancy term for this is subordinated debt.
On the equity side of things, venture capitalists and many angel investors purchase preferred shares that are senior to common shares owned by founders. So the investors get paid first when the company is sold. Exactly how that works can be quite complicated.