Pergunta de entrevista da empresa Infosys

What is a diode? And how does it work?