There are many international agreements, declarations, and norms. Which of these give rise to obligations that are binding on nation states at international law?
Generally: treaties, customary international law, and unilateral declarations can give rise to binding obligations
The most well-accepted sources of international law are summarized in Article 38(1) of the Statute of the International Court of Justice:
a. international conventions, whether general or particular, establishing rules expressly recognized by the contesting states;
b. international custom, as evidence of a general practice accepted as law;
c. the general principles of law recognized by civilized nations;
d. subject to the provisions of Article 59, judicial decisions and the teachings of the most highly qualified publicists of the various nations, as subsidiary means for the determination of rules of law.
Sources of obligations are treaties (also called conventions or agreements) and customary international law (see generally, John H. Currie, Public International Law, p. 99-100). A third—unilateral declarations—has also been recognized, but it is less well developed as a source (see Currie at p. 111-117; Nuclear Tests (Australia v. France),  I.C.J. Rep. 253, p. 266):
It is well recognized that declarations made by way of unilateral acts, concerning legal or factual situations, may have the effect of creating legal obligations. Declarations of this kind may be, and often are, very specific. When it is the intention of the State making the declaration that it should become bound according to its terms, that intention confers on the declaration the character of a legal undertaking, the State being thenceforth legally required to follow a course of conduct consistent with the declaration. An undertaking of this kind, if given publicly, and with an intent to be bound, even though not made within the context of international negotiations, is binding. In these circumstances, nothing in the nature of a quid pro quo nor any subsequent acceptance of the declaration, nor even any reply or reaction from other States, is required for the declaration to take effect, since such a requirement would be inconsistent with the strictly unilateral nature of the juridical act by which the pronouncement by the State was made.
Treaties (also sometimes called "conventions", "charters", "covenants", "protocols", "pacts", "acts", "statutes", or "agreements" (Currie, p. 125)) express the will of the parties to be bound by their terms. The law of treaties is itself largely governed by a treaty: the Vienna Convention on the Law of Treaties. The Vienna Convention describes the ratification process and how treaties come into force. It specifies that treaties are binding upon the parties and that treaties must be performed in good faith.
Customary International Law
It is also widely recognized that there exists customary international law that creates or reflects binding obligations on states. For something to be customary international law, a rule must satisfy two elements (see Currie, p. 188):
- general and uniform state practice; and
- opinio juris (the requirement that states believe that the rule is legally obligatory).
See also Nevsun Resources Ltd. v. Araya, 2020 SCC 5:
 There are two requirements for a norm of customary international law to be recognized as such: general but not necessarily universal practice, and opinio juris, namely the belief that such practice amounts to a legal obligation. [citations omitted]
 To meet the first requirement, the practice must be sufficiently general, widespread, representative and consistent. To meet the second requirement, opinio juris, the practice “must be undertaken with a sense of legal right or obligation”, as “distinguished from mere usage or habit.” [citations omitted]
 When an international practice develops from being intermittent and voluntary into being widely accepted and believed to be obligatory, it becomes a norm of customary international law.
 Once a practice becomes a norm of customary international law, by its very nature it “must have equal force for all members of the international community, and cannot therefore be the subject of any right of unilateral exclusion exercisable at will by any one of them in its own favour.” [citations omitted]
There are some elements of customary international law that are "non-derogable" (Currie, p. 206; Vienna Convention, art. 53). These are called jus cogens or peremptory norms. These cannot be derogated from even by treaty. See Nevsun Resources Ltd. v. Araya, 2020 SCC 5:
 Within customary international law, there is a subset of norms known as jus cogens, or peremptory norms, which have been “accepted and recognized by the international community of States as a whole . . . from which no derogation is permitted and which can be modified only by a subsequent norm of general international law having the same character.” This Court acknowledged that “a peremptory norm, or jus cogens norm is a fundamental tenet of international law that is non-derogable.” [citations omitted]
Relationship to domestic law
Treaties do not change domestic law. States must take actions in good faith towards implementing treaties in their domestic law. This is known as the dualist approach.
However, even in countries that take a dualist approach to treaty implementation, the dominant approach to customary international law is that it is directly and automatically incorporated into domestic law (see Nevsun, paras. 86-89, in particular the empirical study of Professors Pierre-Hugues Verdier and Mila Versteeg cited at para. 88):
[P]erhaps the most striking pattern that emerges from our data is that in virtually all states, CIL [Customary International Law] rules are in principle directly applicable without legislative implementation. . . . [M]ost countries that require treaty implementation do not apply the same rule to international custom, but rather apply it directly.