Hi - my name is XXXXX XXXXX I'm a Business litigation attorney. Thanks for your question.
The main thing you want to do is have an "asset only" purchase. A local attorney can draw up a contract for you. An asset only purchase means that you're buying all of the equipment, inventory, business name, accounts, client lists, etc., but you are not assuming any liabilities of the company. Liabilities could be anything from debts the company has to legal liability for work performed, negligence, etc.
Your asset purchase agreement would need to state that the seller will indemnify and hold you harmless for any claims that occurred before the date of purchase.
If there's a franchise to be bought, you need to contact the company and make sure the franchise is assignable, and if the person owes any money to the franchise, you need to make sure that part of the purchase price is going to be paid to the company to pay off the franchise. The last thing you'd want to face is a claim from the franchise company that the seller owed money, and if you don't pay it (in addition to what you've already paid), they'll pull your franchise.
If you're buying the real estate, you need to make sure the title to the property is free of all liens and judgments. If there are liens, you will need to address and have those paid off with the sale proceeds.
Also, you should have an accountant review the books to make sure the business is as profitable as advertised. It is well worth the money to make sure you know what you're getting.
You will need to also make sure there are no state or federal tax liens on the business for state income tax, employment tax, etc. that the business hasn't paid. If so, that needs to be cleaned up as well. This is especially true if you want to keep the business name the same. The taxing authorities may not realize the property has changed hands and could attempt to collect from you.
The main thing is to make sure all liens and taxes are clear (or will be paid off with the purchase money), that the franchise (if one) is transferable, that you are only buying the company's assets and that the business generates the money you've been told.
If you hire a local attorney to handle the transaction for you, he/she will attend to all of these things and any other particular issue that may arise.