According to Wikipedia, “The most common function of a diode is to allow an electric current to pass in one direction (called the diode's forward direction), while blocking current in the opposite direction (the reverse direction). Thus, the diode can be viewed as an electronic version of a check valve."
What is a check valve? You can think of it like a ping pong ball cage snorkel.
When the ping pong ball cage is above the surface of the water, the ping pong ball is at the bottom of the cage and you can breathe through the snorkel. As the cage moves below the surface of the water, the ping pong ball floats up until it blocks the opening of the snorkel blocking any water from getting into the snorkel.
The diode has a number of applications in electronic circuits. One application you may be familiar with is a rectifier. A rectifier converts alternating current (AC) to direct current (DC). Alternating current periodically changes direction while direct current only flows in one direction.
To use a diving analogy, imagine a scuba diver. Since scuba divers carry their air with them they can still breathe whether their heads are above water or underwater. You can imagine a scuba diver surfacing and diving repeatedly and the path the diver traces forms a sine wave.
The sine wave is what alternating current looks like. At the crest, or top of the wave you might measure +5 volts and at the trough, or bottom of the wave you might measure -5 volts. At the line through the middle you would measure 0 volts.
Let’s say we wanted to use a diode as a rectifier to convert alternating current to direct current.
Now imagine our snorkeler surfacing and diving. While the ping pong ball cage on the snorkel is above the water the snorkeler can take a breath of air.
When the cage sinks below the water the ping pong ball blocks the water from getting into the snorkel and the snorkeler has to hold his or her breath until surfacing again to exhale and take another breath.
Like the ping pong ball acts as a check valve to prevent water from getting into the snorkel, the diode acts as a check valve to block current from flowing in the reverse direction.
The diagram is what the voltage will look like when the alternating current is converted to direct current.
You would measure from 0 volts to +5 volts then back to 0 volts. You wouldn't be able to measure the voltage in the reverse direction from 0 volts to -5 volts because it is being blocked by the diode. When the alternating current cycles back to 0 volts you would then be able to measure the voltage from 0 volts to +5 volts and then back to 0 volts.
Now we can see what happens when we reverse the diode. Build the circuit shown with the diode in the reverse direction. The photos show the step-by-step build. When you're done building the circuit, slide the switch (S1) from the off position to the on position. Well...nothing happens.
In a DC (direct current) circuit, the electricity flows in one direction.
When you switch the circuit on you can think of it as current flowing from the positive side of the battery (marked with a "+" sign) to ground (marked with a "-" sign) and you can think of the flow of current as kinetic energy that can be used to do useful work such as light up an incandescent bulb.
So, when you switch the circuit on, why doesn't the light bulb light up? Because the diode is blocking the flow of electrcity like the ping pong ball on the snorkel blocking the water from getting in.
Now let's take a look at the Light Emitting Diode (LED).
The light emitting diode functions much the same as an ordinary diode, but also lights up when enough current is flowing through it in the forward direction (forward-biased). LEDs are often used in electronic devices to indicate that the device is switched on, but they can serve many practical purposes.
Build the circuit shown. The photos demonstrate the step-by-step build.
When you switch the circuit on...again, nothing happens. Why doesn't the light LED light up? Because the LED is reversed and blocking the flow of electrcity.