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.
It’s not unusual for an old house to have an old doorbell lurking about somewhere that hasn’t worked in years. Fortunately, it’s likely a simple matter to get things back in working order. As illustrated in the above diagram, the parts of an old doorbell circuit include the bell, a button mounted at the door, and a battery somewhere in between the two.
Here 3-wire cable serves a split receptacle. The bottom half of the receptacle is controlled by a switch and the top half is always-hot.
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.