What is the difference between realism and liberalism? Which is best in explaining international relations and politics generally?
Realism is the theory of international relations under which nations are rational agents that each act in their own self-interest. Realists consider the internal structure of a national government to be largely irrelevant, and model international politics as essentially a competition between different self-interested individuals who are fighting over territory and resources.
Liberalism is the theory of international relations that nations are structured around values, and their internal structure does matter; liberal theorists typically argue that democratic countries are more peaceful than authoritarian countries, for example. Liberals believe that international cooperation can be established and maintained, and is more likely to work when different nations share the same values and system of government.
We can actually think of these as two ends of a continuum: At the extreme realist end of the continuum, international politics is just a Hobbesian war of all against all where everyone is constantly fighting over resources, while at the extreme liberal end of the continuum, international politics is a story of peace and harmony where all nations settle their differences peacefully and work together.
Clearly, neither of those extremes is true. There is both substantial cooperation and substantial violence in real-world international politics. So we are in fact somewhere in the middle of that continuum, not completely realist and not completely liberal either. But the liberal project of uniting many nations under peaceful cooperation has actually been largely successful, especially since the end of the Cold War. Global violence has been declining for centuries, and saw its most rapid decline in my own lifetime. War and poverty are now at an all-time low. So in that sense, I think the liberals are more on track than the realists.
That doesn't mean we can completely ignore self-interested incentives and assume that everyone will always do the right thing, but it does mean that under the right circumstances we can establish institutions that will make people better at working together in peace.