compare(Order, Term_1, Term_2) is true if and only if Term_1 and Term_2 respect the Order order. Rules about ordering can be found here.