The second argument of Arrays.sort() expects a java Comparator which is a functional interface that expects two arguments (a,b) and expects to return a concrete comparator logic (here Integer.compare(a[0],b[0]).
Now, the integer compare method is already a library method which returns -1,0 and 1 whenever a is less than, equal to or greater than b respectively.
If we dig deeper, this integer is fed to the internal sorting algorithm which is used by the language (here java). In the algo's comparision logic (mergesort etc), it just uses this returned integer by Integer.compare() to decide whether or not to swap two elements.