The wiring in this diagram is for adding a new light fixture to a switched receptacle, i.e. one that is hot only when a switch is on. These are commonly used to turn a table or floor lamp on and off from a wall switch.
The neutral and ground wires for the circuit are connected to a bar along the side of the service panel box. The neutral and grounding bars in the box may be separate or, in the case of older service panels, the same bar may be used for both purposes.
A special isolated-ground receptacle is require for this circuit and can be identified by the orange color and a small triangle imprinted on the face. When connecting the wires, the isolated ground wire (the red wire pictured here) is marked with green tape or paint on each end and connected to the grounding bar in the service panel, and to the grounding terminal on the receptacle.
Here a 2-way push-button switch is wired to a lamp with 2 bulbs. This diagram can be used to rewire an old push-button lamp with a new switch replacement. The hot wire from the cord is connected directly to the black wire on the switch and the neutral is spliced to the neutral contact on each bulb sockets. The red and blue wires from the switch are each connected to the hot contact on one of the bulb sockets.