Agilent Technologies Interview Question

Explain how a diode works.