Generally, an answer is a reply to a question. It can be solution, a retaliation or a response to it.
In law, an answer was originally a solemn assertion in opposition to someone or something, and thus generally any counter-statement or defense, a reply to a question or response, or objection, or a correct solution of a problem.