A contract is formed in law when there is a clear offer made by one party, an unequivocal acceptance of that offer by another party, consideration exchanged by both parties, and the intention to create a legally binding agreement between them. Additionally, both parties must have the capacity to enter into a contract and the contract must adhere to the laws and regulations governing it.