Turning on and off LED according to the toggle switch state

It's this a simulation of a real circuit?