Of course, a firm does not own its customers. Therefore, there is nothing specific that happens to them when a firm goes out of business.
When a firm goes out of business, it can sell the things that it actually owns. A restaurant that goes out of business, for example, can sell any buildings it owns. If it does not own the buildings, it might own the stoves and ovens and/or all of the cooking utensils. It might own the tables and the dishes. It can sell all of those things and use the proceeds to pay off any debts it might have or simply to make money for its owners.
But a firm does not own its customers. When a firm goes out of business, its customers are free to give their business to any other firm. If, for example, a law firm goes out of business, all of its clients are free to find new lawyers. Of course, they would be free to quit using the firm even it were still in business, so it is not as if the customers are now “free.” The customers have one fewer option; they can no longer use this particular firm, but they can go to any other firm that offers the same sort of goods or services that they used to get from the firm that went out of business.