The answer establishes which allegations (cause of action in civil matters) set forth by the complaining party will be contested by the defendant, and states all the defendant's defenses, thus establishing the nature and parameters of the controversy to be decided by the court.
In a criminal case, there is usually an arraignment or some other kind of appearance before the court by the defendant. The pleading in the criminal case, which is entered on the record in open court, is usually either guilty or not guilty. Generally speaking in private, civil cases there is no plea entered of guilt or innocence. There is only a judgment that grants money damages or some other kind of equitable remedy such as restitution or a permanent injunction. Criminal cases may lead to fines or other punishment, such as imprisonment.
The famous Latin Responsa Prudentium ("answers of the learned ones") were the accumulated views of many successive generations of Roman lawyers, a body of legal opinion which gradually became authoritative.
In music an "answer" (also known as countersubject) is the technical name in counterpoint for the repetition or modification by one part or instrument of a theme proposed by another.
Generally, an answer is a reply to a question or is a solution, a retaliation, or a response.