A contract is a formal document that is enforceable by law as it has binding obligations that both parties must fulfill. While an agreement is a mutual understanding between parties which could be informal with no legal implications.