When an individual or company files for bankruptcy in court, a bankruptcy estate is formed, which secures all the debtor's assets for the purpose of covering their outstanding debts. Normally, the bankruptcy estate will be evaluated by a trustee appointed by the court, who will have the full right to utilize any of the assets included in the bankruptcy estate when they deem that the debtor is unable to repay their dues and selling off one of their assets is the only way to cover their debt.
It should be noted that a bankruptcy estate covers not only assets owned by the debtor him/herself, but also assets under the ownership of their spouse or shared community assets in which the debtor has some limited ownership. Typically, the debtor will be prohibited from making any deals based on those assets until their debt has been paid off, in order to ensure that the assets can be properly utilized for the purpose of covering their debt in the coming weeks/months.
It's normally up to the debtor to disclose their full range of assets when filing for bankruptcy, and these claims will frequently be verified by a court-appointed official to ensure that the debtor isn't omitting anything (be it on purpose or accidentally), in order to provide an honest and rightful evaluation of the assets which are included in the bankruptcy estate. Sometimes, the debtor will be asked to list any assets which cannot be added to the bankruptcy estate for one reason or another.