A complaint is a formal legal document that initiates a lawsuit by outlining the plaintiff's claims against the defendant. It serves to inform the defendant of the allegations being made and the relief sought by the plaintiff, setting the stage for the legal proceedings to follow. The complaint must adhere to specific rules and formats dictated by civil procedure, ensuring that it clearly presents the necessary facts and legal grounds for the case.