There's only one electrical connector there - it has three wires, black, ground; red, +12V power to the pump and pink, feedback from the pressure switch to the 4WD controller.
Very simplified, here's the sequence of events - the 4WD switch on the transfer case tells the 4WD controller when 4WD has been selected, and the controller applies power to the pump and monitors the feedback signal - if it sees the signal go high, it turns the 4WD light on, if it does not go high after 10 seconds, the controller shuts the pump off as a protective measure. Assuming that everything is functional, the pressure from the pump engages a freewheel clutch transmissitng drive from the ring & pinion to the differential.
When you shift back to 2WD, the controller shuts the pump off & opens a "dump valve" releasing the air and disengaging the freewheel mechanism