Ericsson interview question

What is a diode.? Explain it's function.