When an airline goes bankrupt and stops operating, you technically become one of the airline's creditors in bankruptcy. If you file a claim in the bankruptcy court, there is a chance you will recover some very small percentage of the value of the ticket, but more likely you will recover nothing at all.
But just because an airline is in bankruptcy doesn't mean it has stopped operating. Your ticket may end up getting you where you want to go, on the carrier you expected.
In the past, most airlines would honor a bankrupt airline's ticket and allow you on a substitute flight. But these days, given the competitive nature of the airline industry, this is rarely done. Sometimes, as a gesture of good will (and a way of luring new customers), an airline will offer a special discounted fare for passengers holding tickets on a bankrupt airline. If you have a ticket on a bankrupt airline and are a frequent flyer on another airline, try to negotiate free or discounted travel using the bankrupt airline's ticket. Trip cancellation or trip interruption insurance can sometimes cover the cost of a replacement ticket.
If you have an e-ticket on an airline sliding into bankruptcy and you can't stand the uncertainty, run to the nearest ticket counter for your airline and exchange it for a paper ticket. Any airline nice enough to accept passengers from a bankrupt airline will accept only those passengers with paper tickets.