Diodes have a low resistance if they are forward biased.
Diodes have an extremely high resistance when they are reverse biased.
By switching the bias from forward to reverse, the diode can be "turned on or off" like a switch.
This circuit only works for AC signals.
As there are quite large DC voltage changes when the circuit switches, there could be unpleasant clicks in the output.
The DC voltage clicks can be eliminated by slowing down the rate at which the DC voltages swing. The RC timing circuits on the logic input achieve this quite well.
Reversing the diode direction changes the switch from normally open to normally closed.