International law is real law, but its enforcement mechanism is categorically different from domestic law. There is no world police, no compulsory jurisdiction, no guarantee that judgments will be implemented.
States comply with international law most of the time — not primarily because they're forced to, but because compliance is in their interest (reciprocity, reputation, domestic politics). This is weaker than domestic law but stronger than nothing.
The interesting cases: when do states comply against their immediate interest? The literature suggests: when they have strong domestic legal cultures, when the rule is highly legitimate, and when the costs of violation are reputationally high.
Related: law-as-coordination, rule-of-law-components