The rules of a contract include mutual agreement between parties (offer and acceptance), consideration (something of value exchanged), legal capacity of parties, a lawful purpose, and clear terms. The contract must be made voluntarily and with the intention to create legal obligations, and it must comply with applicable laws and regulations.