A contract  is a binding agreement between two or more parties that is written, signed, and can be enforced according to the law. (In some cases, an oral contract may even be considered a legally binding contract!) Care should be taken whenever entering into any sort of a contract, because signing such a document means that the information entered on the contract is legally binding! The contract represents an exchange of promises, and both parties are held responsible for what they agree to accomplish or provide.
With that said, however, contracts  must not be illegal (or, for that matter, impossible to fulfill) in order to be an enforceable agreement. If the contract is a legal agreement, then the breach of that contract is considered to be a legal matter, and it is possible for the law to intervene to remedy the situation.
Contracts may also be bilateral or unilateral. This means that in a bilateral contract both parties promise to perform some element of the agreement. For example, in the contract arranging for the sale of a house, the buyer will agree to pay the seller a specific sum of money. On the other hand, the seller agrees to provide the buyer with the actual title to the property.
A unilateral contract means that only one of the parties to the contract makes a promise. A common unilateral contract might be a reward for finding someone’s lost briefcase. No-one is obligated to go out and search for the lost briefcase, but the owner of the briefcase is obligated to pay the reward if someone does happen to find and return it.