Wolfspeed interview question

Explain how a diode works