In these cases, it should be wrapped with electrical tape to mark it as hot. The ground wires will be green and/or bare copper. The ground should be spliced with a short piece of wire and connected to each device and outlet box that has a grounding terminal. In these drawing the brass colored terminal represent the hot side of the device and the silver colored terminal represent the neutral. Ground wires and terminals are in green.
The source hot is spliced to the red wire which is connected to the bottom terminals on the switch at the other end. The black wire is connected to the top terminal on the switch which runs power back to the fan where it is spliced to both the black and blue fan wires.
This diagram is similar to the one above, but with the electrical source originating at the fixture. Three-wire cable runs from there to the controllers. The neutral wire from the source is spliced directly to the white wire on the fan/light. The hot source wire is spliced to the white on the 3-wire cable and then spliced to the input wires on both controllers at the other end.
In this diagram, a light switch and receptacle are wired in the same box. Both devices are spliced to the same hot source and the neutral to the neutral on the receptacle, and through to the light fixture located in a separate box.