Texas Instruments Interview Question

How does a diode work?