Buying a business – difference between buying assets vs shares?

When you purchase shares of a company, you are acquiring all the liabilities of the company.  This includes current, future, unrecorded and tax liabilities.
All of the assets of the company go to the new owner of the business if they buy shares of the business.

If you purchase the assets of the business, you are acquiring tangible assets such and machinery and equipment, fixtures and fittings. You are also acquiring all of the intangible assets such as Goodwill.

Generally, most businesses are sold by way of a asset sale rather than a share sale.