Diodes allow electrical current to flow only one way. When they are placed in a circuit they can be used to convert alternating (both forward and reverse) current into direct (one way) current. This process is called rectification.
one use is to place at the end of track to stop loco running into the buffers on analogue control.
They can also be used as voltage droppers for some shuttle modules. As protection against transients and much more.
Now sold individually or in packs of 10 for better value.