Ok so you own securities in a bankrupt company. If they’re stock, you’re probably going to be wiped out. If you own bonds, you are a creditor in the bankruptcy proceedings. Depending on how the proceedings go, you may get shares or bonds in the company. Or you may get cash as the company sells off their assets. Often times, you will receive a good chunk (but not all) your par value in either new securities or cash. Generally financial companies have paid out less in default but this is not always the case. You may also be able to sell your bonds on the open market, the market offerings will give you an indication of when and how much the bonds are expected to pay off. However, people may lowball you, and you will probably have to vote on some of the deals in bankruptcy so you will want to work with an advisor.
Municipal bonds are a little different, and the paradigms of municipal bankruptcy proceedings are changing so I won’t go through those. However, many municipal bonds are insured, and the insurer will continue making payments on the issuer’s behalf if they do go into bankruptcy.