When selling a company you are selling your shares in the company. The company will still own its assets and be subject to the same liabilities as before the sale.
When selling a business, the buyer and seller must agree what assets and liabilities are to be transferred. Some liabilities and/or assets may remain with the seller after the sale.