In the realm of international relations, realists are generally hostile to the constraining force of international law. They tend to see the nation-state as being the locus of legal and political legitimacy in the world. For the realist, the nation-state, not international bodies like the United Nations, is the principle actor in international relations. To be sure, there are other actors involved in international relations, such as individuals and organizations, but their power is limited by comparison.
In realist thought, nation-states compete with each other in a rational contest for supremacy. Inevitably, this leads to a considerable degree of conflict, as there is no international power capable of regulating the intense competition between state actors.
Though realists acknowledge the existence of international law, they tend to regard it as being based on principles that have little or no practical application in the cutthroat world of international power politics. In the almost anarchic free-for-all that the realist picture portrays, individual nation-states need the maximum degree of sovereignty to compete effectively on the international stage.
International law, on this reading, severely diminishes the sovereignty of the nation-state, thus diminishing its capacity to achieve its rational objectives vis a vis its competitors. Some international laws and regulations are necessary but should only be signed up to by sovereign nation states out of self-interest, and even then only on the explicit understanding that any such agreements will not ultimately undermine the freedom of nation-states to conduct their own foreign policy.
Liberals attach much more importance to international law; they see it as a useful mechanism for reigning in the selfish impulses of nation-state actors. No less than realists, they point to examples from history to bolster their claims, though of course they arrive at radically different conclusions. They see history as a litany of war and destruction in which the unrestrained greed for territory and resources has led to suffering on an unimaginable scale.
To build a more peaceful future, it is necessary, according to the liberal, to build international institutions founded on international law that will ensure that nations work together wherever possible instead of competing with each other. If nation-states voluntarily agree to pool their sovereignty together in international bodies such as the European Union, then it is less likely that they will go to war with each other, as no one nation-state will enjoy too much of an advantage.
International law has a big part to play in both the establishment of international bodies as well as their continued development. A joint commitment among nation-states to legal rules and norms that act as a common constraint should, in theory, lead to a more peaceful co-existence.
One could say that in their valorization of international law, liberals extend the internal restraints on power that exist within nation-states to international bodies, whereas realists keep such restrains firmly within the geographical boundaries of the nation state.