A treaty is an expression of agreement between international actors -- nation states and international organisations -- under international law. Treaties can also be referred to as protocols, covenants, conventions, or an exchange of letters. They function under a similar principle as contracts, wherein willing parties assume obligations among themselves and make themselves liable for failing to live up to their obligations.
Advantage: Puts Goals Into Writing
International treaties put sought-after goals or obligations into a mutually agreed-upon written document. Whereas spoken messages of intent or promises can be broken with limited backlash, violation of treaties is frowned upon in the international community and can carry significant consequences.
Advantage: Binding Under International Law
Once a treaty comes into effect, it's considered a binding agreement under international law. For this reason, failure to meet the obligations specified within the treaty can be resolved through international legal tribunals and international arbitration -- either by an international organisation such as the International Court of Justice or third-party nation states. This allows disinterested third parties to aid in the mediation process, which can be easily bogged down by national self-interest.
Disadvantage: Requires Ratification
Treaties are only considered binding if they're ratified by the constituent parties. For instance, following World War I, the United States under President Woodrow Wilson proposed the creation of the League of Nations as an amendment to the Treaty of Versailles. Though this was agreed upon by all parties present at the Paris Peace Conference, the treaty was not ratified by the United States Congress and, therefore, all American obligations to the treaty were nullified.
Disadvantage: Enforcing International Law
The main difference between contracts and treaties is that contracts are enforceable by an overriding legal body. Although there is a body of international law and a series of supranational institutions designed to enforce it, it's ultimately up to the nations involved to enforce it. There is no supranational institution capable of effectively policing international law, so if other nations aren't willing to engage in conflict or jeopardise their relationship with the affected parties they often don't intervene.