A diode is two terminal PN junctions, the PN junction when Forward Biased acts as closed-circuited and when Reversed Biased acts as an open-circuited. Hence change in state from Forward Biased to Reverse Biased makes the diode work as a switch, the Forward being ON and the Reverse being OFF.
Whenever a specified voltage is exceeded, the diode resistance gets increased, making the diode reverse biased and it acts as an open switch.
Whenever the voltage applied is below the reference voltage, the diode resistance gets decreased, making the diode forward biased, and it acts as a closed switch.