Distance is the straight line over the Earth’s surface between the middle of each country, in kilometres. It is approximate because countries are not points.
Each country is represented by a point near its geographic middle, and the game works out the great-circle distance between two points.
For very large or oddly shaped countries the middle can be far from a border, so a guess can feel closer or farther than the map suggests.
See also What proximity means. For tips, read the Closer or Farther tips and strategy.