To wire an exhaust fan to a wall switch, use this diagram. These fans usually come with a small electrical connection box welded to the side of the housing. There will be a cover on the connection box that fastens with a small screw. Open it, pop the plug out of one of the wire holes and thread a wire clamp into it.
The black wire is splice to the output on the speed controller and to the black, fan wire at the other end. The red wire is spliced to the output on the dimmer and to the blue, light wire at the other end. The neutral from the source is spliced in the switch box with the white wire, and to the neutral wire on the ceiling fixture at the other end.
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 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.