Court procedure and legal requirements will vary from state to state. Some courts have optional forms that you can use. Here is an example form California: http://www.courtinfo.ca.gov/forms/documents/982115.pdf. In most cases, it is better to have a custom document prepared by an attorney that asserts all of the appropriate defenses. Check with a local law library for the procedures in your area. If there is a law school in your community, it may have a program by which law students, under the supervision of professors, assist lay people with their legal problems; you may want to check into that. Also, if you qualify by income, community legal aid societies may help.
If you choose to represent yourself, the key to preparing an answer is to keep it responsive to the allegations of the complaint. That is, respond individually to each of the numbered paragraphs of the complaint with an express admission, denial or statement that you cannot admit or deny due to lack of knowledge (if your rules of procedure allow this). You may also want to include a catchall statement to the effect that "all allegations not expressly admitted are denied".
You must also assert your "affirmative defenses", if any, in the answer. These are factors which, if proven, may excuse or ameliorate whatever liability is alleged against you by the Plaintiff. For example, if the suit is based upon negligence in causing an auto collision, an affirmative defense might be comparative or contributory negligence (whichever theory your state adheres to). Another might be that another party, not made a party to the pending lawsuit, was the proximate cause of the Plaintiff's damage, or that the claimed cost of repair to the Plaintiff's car was neither necessary nor reasonable. The point is, that you must raise these defenses in the answer or else they may be considered to have been waived. Remember that you have the burden of proof at trial of proving the defenses upon which you want to rely.
It is extremely important that the answer get filed within the time allowed by law, which is usually shown on the summons that accompanies the complaint. If the answer is late, you will be considered in default and the allegations of the complaint will be considered to have been admitted. While it is often possible to have the default set aside, doing so requires a request the court (by filing a written motion) setting forth a reasonable and truthful excuse. Many jurisdictions also require that the motion assert the basics of your defense to the lawsuit so as to see that setting aside the default will not be a waste of time (that is, that there are genuine issues of law or fact for the court to decide).
It may be that you also have a claim back against the Plaintiff. If that claim arises from the same transaction or occurrence as the original complaint, you will need to assert it along with your answer as a "compulsory counterclaim". If you do not, the law of your state may deem it waived. There also exist "permissive counterclaims" which, although against the same person/entity that sued you, arise from different transactions or occurrences. Those may be asserted in the context of the pending action, or may be brought as separate actions before the expiration of the applicable statute of limitations.
Needless to say, copies of everything that you file need to be sent to the Plaintiff's attorney (if represented) or directly to each Plaintiff (if not represented). The originals get filed with the court.