This exercise I learned from taking a master-class with Marcus Stockhausen back in 2005. He's a very good trumpet player with an incredible ear.
The exercise itself was fairly simple -- one player plays a pitch, the second player matches them, the first player moves to another pitch, and then the second player follows. It may sound easy in concept but doing it well actually takes an incredible amount of practice and listening. (Unless you have perfect pitch, which in case it may very well be easy.) Ideally the second player should be able to follow the first person very quickly, and the audible result should sound as if it were a canon.
The task can be simplified by creating limitations on allowed notes; for instance, the two players may agree to play notes that exist only on the C major scale. This will reduce the possible numbers of interval combinations hat can be played, making the process of hearing the changes somewhat easier. This process can also be applied to non-western and non-equal-tempered scales, as long as the mode construction is agreed upon beforehand. The idea behind this exercise is to get the musician familiar with the intervals that exist in a given scale or temperament, so that they're fully aware of its melodic and harmonic possibilities.
If the exercise starts becoming tiresome, the two players may decide to switch roles and establish a new leader. Keep in mind that this exercise is very hard for most people, even experienced ones. I've had a lot of trouble with this, especially since playing the piano lets me somewhat slack on intonation and an exercise like this puts that weakness right on the spotlight. Still, when our group was doing this regularly, our ears were so honed into each other that we could immediately recognize what the other person was playing and use that to our advantage.
On the western equal tempered scale, there are only 12 notes! Sure, there's a lot of possibilities within that, but since it's not infinite, it should theoretically be possible to master all of the intervals within it. Easier said than done, of course...