The white wire is wrapped with black tape to identify it as hot. The black wire connects the fan to the speed controller. The red wire connects the light to the dimmer.
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 wall outlets are wired in a row using the terminal screws to pass voltage from one receptacle to the next. In this diagram, multiple receptacles are connected together using the device, instead of a pigtail splice as shown in the next diagram. Using this method, any break or malfunction at one outlet will likely cause all outlets that follow to fail as well.
The hot wire to the fan in a fan/light kit will usually be black and the light wire will be blue. The white wire is usually the neutral which is always connected directly to the source neutral, either at the source or through a splice in the switch box. The white wire may also be used to carry current when necessary.