§ Contracts are the basis of civilization. Though often thought of as just formalized documents a contract can be made just about any way people can communicate. If two aborigines make a verbal agreement about trading stone arrowheads for a piece of art that is also a contract.
§ The reason written contracts are most often though of is due to their enforceability. It is a lot easier to prove that a person signed a piece of paper. If it is only a verbal contract it can easily turn into a case of "he said" vs. "she said". So the written contract is very popular.
§ A contract is formed whenever there is a meeting of minds over and exchange of value, usually called consideration. If one person does not give something of value there is no contract. It cannot be a one-sided agreement where one person gives away something for nothing. Though what is exchanged does not have to be money for an object.
§ However there is nothing that limits one person getting a better deal. So when agreeing you must be absolutely clear on what you are agreeing to do. That is also another part of contract making. The meeting of minds. If there is a misunderstanding about what is being exchanged then a court may rule that it is invalid. For example if there were two ships in port by the same name and a cargo was loaded on the wrong one there was no contract because of the basic misunderstanding of what was intended. If on the other hand one signatory overlooked some part of the contract that contract is likely to be held as valid.
§ Important Note: I am not a lawyer. Do not take this as legal advice. When in doubt always consult a lawyer, preferably one who is a friend.
§ Contracts are also apparently a favorite of The Devil. Old scratch is often portrayed as making deals that he will adhere to the letter on in exchange for a person's soul. It is also fun to note that the famous contract for Manhattan Island is invalid, since the Indians that sold it did not live there and so could not legally trade it away.