When an individual or corporation wishes to buy a business, they may do this in one of two ways.
The purchase of the trade and assets.
When a purchaser buys the assets and goodwill of a business, the entity that formerly owned the assets and carried out the trade remains in existence, but sells off the trade and the assets to a third party who buys them. The purchaser does not acquire any of the liabilities of the former business.
The sale of shares.
In this case the business remains as it was and continues to trade via the same legal entity. However, the ownership of the entity, usually a limited company, passes with the ownership of its shares to new owners who acquire not just its assets and trade but any liabilites that it may have.