Diodes
Diodes are switches that are not switched actively but switch by themselves. They allow current to pass in one direction only. In the other direction they block. The resistance of a diode is not set by a control input, but only by the direction of current flow and the magnitude of the voltage and current at the diode. Diodes therefore have no separate control input.
Applications
If it is clear that the switch should always close for one current direction and open for the other, diodes are used instead of “real” switches. Diodes are considerably cheaper than switches.
A diode is usually connected so that it does not conduct current permanently. Otherwise it could simply be replaced by a wire. So it is installed in such a way that it conducts in one operating state and blocks in the other. More on this later.