How does an airborne DME unit differentiate itself? The FAA's IFR handbook glosses over a keypoint:


  The aircraft DME transmits interrogating radio frequency (RF) pulses, which are received by the DME antenna at the ground facility. The signal triggers ground receiver equipment to respond to the interrogating aircraft. The airborne DME equipment measures the elapsed time between the interrogation signal sent by the aircraft and reception of the reply pulses from the ground station. This time measurement is converted into distance in nautical miles (NM) from the station.


Which is: how does one airborne DME ignore the replies meant to other planes?

Wikipedia says:


  The aircraft interrogates the ground transponder with a series of pulse-pairs (interrogations) and, after a precise time delay (typically 50 microseconds), the ground station replies with an identical sequence of pulse-pairs. [emphasis added]


So is the pulse-pair unique to each unit? Or does the DME unit listen for replies and then picks a different pulse-pair for itself?

ICAO Annex 10 mentions 4 modes:


  Mode W, X, Y, Z. A method of coding the DME transmissions by time spacing pulses of a pulse pair, so that each frequency can be used more than once.


But it is unclear to me how each airborne DME achieves a unique interrogating signal.

Just the basic concept would be great if the radio theory is too complicated.
As the Wikipedia article states, there are two modes - SEARCH and TRACK. In SEARCH mode, the DME interrogates with up to 150 pulse pairs per second. Similarly, in TRACK mode it interrogates at up to 30 PP/S.  

What it doesn't say is that the interrogations are not evenly spaced at a fixed rate. The DME uses a pseudorandom number generator to vary the transmission interval over a set range. Since the DME knows the timing sequence it sent, it can look for replies that match that sequence.   

The airborne DME can use the knowledge of when it made an interrogation and the maximum round-trip time for the maximum 200 nm range (just over 2.5 msec) to avoid non-correlated replies (to other a/c). The higher rate in SEARCH gives it more opportunity to detect the replies as it has no knowledge of range in search and thus has to scan for the entire range. Once it has detected the ground station replies by finding a correlated sequence of pulse pairs, it can switch to TRACK mode. The lower rate is acceptable once the range is established and the reply window can be narrowed.  

As a note; mode X and Y are in use and differ only in the pulse pair timing, 12 usec  for X and 30 usec for Y.  Modes W and Z were set for DME/P and to my knowledge are not in current use.