Here the source is at the fan/light and a switch loop runs to the wall switch. The source is wired directly to the fan and spliced through to the switch. With this arrangement the light is controlled with the switch and the fan is hardwired for pull-chain control.
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.
This diagram shows two switches in the same box with two separate 120 volt sources. Three-wire cable is supplying the source for both switches with the black and red wires going to the bottom switch terminals. The black wire from each light is connected to the top terminal of their respective switch. The white and ground wires are spliced to run to each light fixture.
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.