Texas Instruments interview question

How does a diode work?