Connect 1 led to Raspberry PI 3 to switch on / switch off it.

As basic diagram for beginners it is the first test you can do to get some skills with Raspberry Pi and Physics. 

 

Be sure to add the resistor in order to avoid melt the led. Pay attention on large leg (anode) and short leg (catode).

 

See in the code section a little example to test it.

 

It is part of several examples.