The rule to remember is simple: Never write without a contract. You don't need to incorporate legal language. I call my contracts a covenant agreement and I've never had legal problems.
It's not as much a legal matter as it is stating what you expect of the authors and what they can expect of you, the writer. You list everything you will do (such as when you'll deliver a first draft of the book and when you'll finish the entire manuscript).
You also list the payment plan. Most writers ask for half of the money up-front and the rest when the project is finished and the author is satisfied. (Some ask for a third to start, a third with the delivery of a full rough draft, and the final third when the author is satisfied with the manuscript.)
Here are a few final thoughts:
* Do not write a book on speculation—unless the author is willing to pay for all your work.
* Never write on credit—a promise of future payment. Get the first payment before you start. (I suggest 50 percent of the total fee.)
* Don't agree to write for royalty unless (a) the person already has a contract or (b) you have a strong belief the book will sell to a royalty-paying publisher.