An extremely useful phrase in the petty world of masculine point-scoring in which many of us dwell.
It is used immediately after some form of victory has been attained. The scale of this victory is irrelevant. The phrase simply serves to rub salt in to the wound. It is used in all variety of situations and always to great comic effect.