Example Ranking: Secured Debt 1 Secured Debt 2 Unsecured Debt 1 Unsecured Debt 2
In the case of bankruptcy, SD1 is going to be able to make a claim and get first dibs on assets and things to recover its debt. Everyone else has to wait their turn. (This is a super simplified definition)
LLC and C Corp liability is generally designed to shield you from personal liability. There are few cases where the shield of liability is "pierced" to go after the person who ran the company. "Piercing the veil" is what it is called, and it doesn't happen often, but when it does its a big deal.
I've seen a few cases in school about it, mostly about CEOs just running amok and stealing money, while having duties of good faith, loyalty etc...