What is the role of diodes in voltage and current flow ?

What is the role of diodes in voltage and current flow ? There are many types of diodes, but basically they allow current flow in one direction. A few modify that function by acting as a switch on/off also.