There are many ways of looking at international law and who enforces it. I will offer you the traditional view that many lawyers are taught but also mix in a bit of the more modern view in the end.
So, international law is best understood when compared to national law. In a national legal order, you have one institution in charge of making laws and one in charge of enforcing them, right?
Well in international law, who makes the laws? Generally speaking, because states are sovereign, only the states themselves make the laws. How? By either signing a treaty or creating customary rules. Treaties are created when two or more states basically sign a contract. Treaties can be as big as the UN Charter or as small as a fishing rights treaty between two neighboring states. Customary laws are created when a majority of states act (or refrain from acting) in a certain way and do so believing they are adhering to a legal rule. For example, the right to self defense was long a customary norm before it was codified in the UN Charter.
So, who enforces these laws? Well, this is the core issue of international law. Because countries, unlike citizens in a national legal order, are sovereign, there is no police and no one else to enforce the law but the countries themselves. So if a country violates the law, other countries enforce it. This can be done either through unilateral action or collective action. Collective action can many times go through the UN Security Council. To get the Council to act however, you need to have the most powerful countries in the world unite under a course of action. This has proven to be very hard. Often times then, enforcement takes the form of economic sanctions or sometimes even military force. Other times, enforcement simply never happens.
So to summarize, international law is made up of rules that states have agreed to follow. States themselves enforce these rules. Why? Because states are sovereign entities. You can immediately see the problem here. It is easy for the US to enforce the law on a country like Estonia, but a lot harder for Estonia to enforce it on the US. The most powerful countries can make more laws and the most powerful countries have to follow less laws, and vice versa.
However, just because laws are unjustly enforced doesn’t mean they don’t exist or aren’t followed! Countries generally follow international law and will provide a legal basis for their actions. Why? What stops the US to break every treaty it has whenever it wants out of nothing but it’s own self interest? Well, in this day and age, countries are pressured to conform with legal norms by demands from their own populations, by the country’s own interest in wanting respect and prestige from the world community, etc. So while international law does have many flaws in terms of enforcement, it still very much affects countries and how they behave.