What is a representation and why are they put in contracts?
From a practical perspective, a contractual representation is a statement of fact in a signed writing made at an easily provable time that, if false, will support a claim for fraud upon showing the other elements of a claim for fraud that are not also included elsewhere in the contract (e.g. knowledge of falsity, the other party's lack of knowledge of falsity and damages). Some other elements of a common law fraud claim (e.g. publication of the statement to the other party, justifiable reliance, and materiality) are often also established on the face of contract that contains representations identified as such.
In a close case, the classification of a statement as a "representation" may also tip the scales if the status of a statement as a statement of a presently existing fact (which a representation must be to be actionable in a fraud action) is disputed.
If a representation concerning a key fact foundational to the contract is not true, that might provide a basis to rescind the contract based upon mutual mistake (even if it doesn't amount to fraud).
Proof that a false representation was intentionally false may give rise to claims for punitive damages and a right to rescind the contract in addition to a claim for compensatory damages.
Representations in a contract also simplify the proof of preliminary facts like the place of incorporation of the signing party, the addresses of the parties, the authority of the person signing it to do so, the fact that someone is not in military service, etc., in a lawsuit arising from the contract on any theory.
Sometimes a representation will "estop" a party from asserting something contrary to that representation in litigation. For example, if the seller represents that the transaction is a consumer transaction, and then tries to say that a consumer protection act claim does not apply because it is not a consumer transaction later on in court, when a dispute arises from the transaction, this argument contrary to the representation in the contract is likely to be summarily dismissed based upon that representation.
As another example, a party might represent that they agree that $500 an hour is a reasonable fee to pay an attorney in the event that a dispute arises under the contract and a prevailing party in litigation becomes entitled to attorneys' fees, which might reduce litigation over whether a party's attorneys are charging reasonable rates in that context.
Similarly, a contractual representation concerning authority to sign is binding on the party for which the signature is made, even if that person doesn't actually have the authority to do so under what is known as the "apparent authority" doctrine in agency law.
And, representations often provide context for the transaction that make it easier to interpret other provisions of the contract that would otherwise be ambiguous. For example, a representation that a transaction is being entered into solely for economic business purposes may help a court decide what other representations and disputes are and are not material to the parties, and might cause a court to decide that non-economic damages (i.e. emotional distress) should not be allowed even with respect to fraud claims arising from a misrepresentation (since non-economic damages are as a default rule allowed in connection with fraud claims in many jurisdictions).
What are warranties and covenants and why are they put in the contracts?
A warranty or covenant is a promise that something will be the case for which there is a remedy if it is not true, without regard to fault on a strict liability basis. Relief for a breach of warranty is generally limited to compensatory damages if breached, and would not generally provide a ground to rescind a contract, but a breach of warranty claim much easier to prove in court because it often doesn't require nearly as much evidence to prove in court as a fraud claim. The evidence beyond the contract itself in a breach of warranty claims is usually in the possession of the aggrieved party prior to bringing a lawsuit.
In a fraud claim based upon a representation, in contrast, some of the facts that must be proved to prevail in court (e.g. the knowledge of the person making the statement at the time that the statement was false) can usually only be obtained from testimony or out of court statements from an opposing party, or made to an opposing party.
Why call something both a representation and a warranty?
One both represents and warrants something in a contract so that both sets of remedies are available if the statement proves to be incorrect.
There is an easy to litigate remedy of money damages if the statement is not true, and harder to litigate fraud remedies if the statement meets the additional conditions.
Other Fine Points
N.B. There are other kinds of contract terms in addition to representations and warranties, such as conditions precedent. But, they are beyond the scope of the question and usually don't appear in a representations and warranties (a.k.a. "reps and warranties") section.
A slightly less common phrase is "represents, warrants and covenants", with the notion being that a warranty usually concerns something that you are promising is true at the time that the contract is signed, while a covenant is something that you promise will be true in the future or on an ongoing basis (sometimes running with the land when real estate is concerned).
So, you might "warrant" in a sale of real estate contract that the house you sold someone is free from defects and "covenant" that you will forever refrain from building any other building in a subdivision that impairs its view of the mountains. Or, you might warrant in a corporate bond contract that no more than 5% of a borrower's accounts receivable are currently overdue, and covenant that you will never let more than 10% of the borrow's accounts receivable enter overdue status.
But, in modern American English legal writing, the distinction between a warranty and a covenant has largely collapsed and even many sophisticated big business contract lawyers no longer use "represents, warrants and covenants" language in their contracts.