This wiring illustrates the switched-receptacle circuit with the switch coming first. The hot source is wired to the bottom terminal on the switch and the top terminal connects to the black running to the receptacle. The source neutral is spliced through to the receptacle neutral.
This is an updated diagram for the same circuit. Here the source neutral, known as a grounded neutral, is run through to the switch box where it can be used to power switches that require a neutral connection. A neutral connection like this is now required in most new switch boxes as of the code changes in 2011.
Here a receptacle is added to a 3 way light circuit before the first switch. It is not controlled with the switches but is instead always hot. The source hot, neutral and ground are spliced to a 2-wire cable that runs to the new outlet. The 3 way switches and light are then wired in the usual way with the common on SW2 spliced to the source hot and the light hot wired to the common on SW1.
The plain wire is the hot. If the cord isn’t marked with a bead then the strands of wire will be different colors. In these cases the silver wire is the neutral and the brass colored wire is the hot. The plug on the lamp cord holds another clue to polarity with the wide prong being the neutral and the narrow one the hot. Older lamp cord will have prongs that are the same size. This is because polarity was not observed on electric lamps until the development of grounded circuits.