A treaty may be "law-making" in that it is the declared intention of the signatories to make or amend their internal laws to give effect to the treaty.
The Berne Convention is an example of such as treaty.
Other treaties are just contracts between the signatories to conduct themselves in a certain way or to do a certain thing.
These latter type of treaties are usually private to two or a limited number of states and may be binding only through the International Court of Justice.
An important distinction between a treaty and a conventional contract is that a treaty lacks any enforcement teeth. A conventional contract will readily be enforced by a Court of law subsequent to which the Court will issue an order, usually for damages. This is enforceable up to an including against the assets of the party that breached the contract, all the while with the enforcement prvisions of the Court and the not-insignificant assistance of the Government and law enforcement powers in regards to the enforcement of judgment. This power - and the culture of compliance with one's contracts it maintains - keeps most people and corporations to their contracts. In the international environment, there is no international law enforcement body so at the end of the day, there is no consequence to a state breaking a treaty except a loss of international credibility.