A light-emitting diode, or LED, is a component capable of emitting light when an electric current passes through it. Today there are LEDS of different colors (red, green, blue, yellow, white) and even LEDS that can display several colors: red, blue and green like RGB LEDS.
The LED only allows current to flow in one direction (from the anode to the cathode). The other direction is called the blocking direction.

Here is the connection of the LED on the ESP32 board: