This sketch is just a switch connected to Arduino Uno, the voltage is 3.3v, the LED act like a resistor (else the circuit will be short), pin 2 is the INPUT pin which tell the MCU if the switch is close(HIGH) or open(LOW).
The circuit is also connected to the serial monitor via pin 2. If the switch is close, the LED will light up and the serial monitor will record as 1.
Also note that I have written 2 lines of code in the setup function, which is to off the pin 13 LED. This is optional.