Treat them as if they were strangers. Forget for the moment that your investor is a friend or family member. Make it an "arm's length" transaction, and insist on the same sort of legal documentation you would prepare if your investor was a total stranger. Why? Because too many entrepreneurs borrow money from family and friends on an informal basis. The terms of the loan have been verbalized but not written down in a contract.
Lending money can be tricky for people who can't view the transaction at arm's length; if they don't feel you're running your business correctly, they might step in and interfere with your operations. In some cases, you can't prevent this, even with a written contract, because many state laws guarantee voting rights to an individual who has invested money in a business. This can, and has, created a lot of hard feelings. Make sure to check with your attorney before accepting any loans from friends or family. So if it's a loan, have your lawyer prepare an I.O.U. (called a "promissory note") for the friend or family member, and don't offer less than a "commercial" interest rate.
Debt may actually be better than equity. If someone "lends" you money, you only have to pay it back, with interest. They can't tell you how to run your company. If someone buys stock in your business, they are legally your business partner. When in doubt, make it a loan, and pay it back as soon as you can.
Tie all payments to your cash flow. Try to avoid obligations with fixed repayment schedules. Consider instead "cash flow" obligations, in which your investor will receive a percentage of your operating cash flow (if any) until they either have been repaid in full with interest, or have achieved a specified percentage return on their investment.
Consider nonvoting stock. If your friend or family member insists on buying stock in your company, try to make it nonvoting stock, so they don't have the right to second-guess your every management decision.