What are the legal requirements for me to purchase an airplane that I will provide instruction in?
The requirement for 100 hour inspections is probably the biggest regulatory/legal item you'll come up against.

As for other regulatory items, there's some fuzz on the subject of whether providing the aircraft used in flight instruction and receiving compensation makes that aircraft "for hire" and triggers all the other FARs that come into play when operating an aircraft "for hire" (like the requirement for a working landing light, or the requirement for approved flotation devices if you're beyond power-off gliding distance from shore).  

I could argue pretty convincingly either way (and there are some convincing arguments on the internet both ways), but I've not seen anything from the FAA that I would call definitive.
The safe interpretation would be to treat the operation as "for hire" unless you can get something in writing from your local FSDO or the FAA Chief Counsel's office saying that it isn't.
(Honestly the additional regulatory burden is really not that onerous - I mean don't you want a working landing light and life jackets anyway?)



As far as liability goes you're going to want to talk to an aviation insurance broker about at least three kinds of policies:


Insurance for yourself, as a CFI.
Insurance for the aircraft, as a rental aircraft/aircraft used for instruction.
"Renter's Insurance" for your students.


The first two cover you.  The third protects your students in case they damage the aircraft on a solo flight: your insurance company may try to recoup their loss from the student responsible for the damages (subrogation), and a (good) renter's insurance policy would cover such an occurrence, as well as paying for any other things which may have been damaged like airport lighting, parked aircraft, etc.

These insurance policies may also have additional requirements above and beyond those in the FARs.

Depending on your personal assets and the level of risk you're comfortable with an umbrella liability policy - either through your aviation broker or another broker/agent - may also be something worth considering (if you have such a policy written by someone who does not specialize in aviation make certain the policy does not have an aviation exclusion).