The purpose of pleadings in a civil suit filed with a court is for both parties to the suit to present their positions, and usually include the initial back-and-forth dynamics that are common to civil procedures prior to a trial. Judges, especially those with a sizable backlog of cases, generally prefer for the parties to a civil suit to negotiate a resolution of the conflict rather than proceed to trial. That history of pre-trial negotiations are reflected in the pleading, enabling the judge to begin the trial with an adequate assessment of the case’s history.
As the civil suit has brought by an individual or individuals with a grievance, the pleading begins with his or her complaint, which is a presentation of the “facts” as known to the plaintiff, including the relevant section of law. The defendant presents his or her side of the issue, or offers an explanation that he or she hopes will result in the case being dismissed by the judge. The two parties may have gone back-and-forth two or more times by the time the case reaches court. The defendant may file a counter-suit, or file what’s known as a “demurrer,” which is an objection to the legal basis undergirding the plaintiff’s suit. Pleadings provide the formal initiation of a civil suit, and provide the framework in which the subsequent deliberations take place.
The primary purpose of pleading is to narrow the issues. Fact pleading which is typical in state courts requires that detailed individual facts or allegations be set forth in numbered paragraphs set within a framework of individual causes of action. Generally a cause of action is the specific law which being violated gives the plaintiff a basis for compensation. A defendant's answer to a plaintiff's complaint should follow the numbered paragraphs and specifically respond to each allegation. A defendant then can add new facts and even his own counter-claim. The plaintiff would then in the same fashion respond to the new allegations. So after the complaint => answer/new matter/counterclaim => reply/answer to counterclaim/new matter => reply, the factual disputes of a case should be clear.
Paralleling the factual allegations is the legal maneuvers around the legal claims or causes of action. Perhaps as the facts develop it becomes apparent that a legal claim doesn't have the factual basis or the evidence to support it. A party can then demur to the complaint (or counter-claim). They also can motion for a judgment on the pleadings or after discovery can motion for summary judgment. A party can even ask to amend a pleading. After the pleadings are closed the case then goes to a judge for a pretrial conference and ultimately to trial.
Obviously there is a lot of tactics to pleadings. Usually a party wants to make as many legal claims as possible and yet be as vague and general with the facts. Too broad with the claims and too vague with the facts may leave a party subject to any of the above motions and risk having the case thrown out. Sometimes it is better to show the other side everything in minute detail in the hopes of a quick concession resulting in a settlement. Lawyers don't make much money in those circumstances.