Turn off the power to the wires you are working on at the house's distribution panel. Flip the breaker and confirm the power is off by touching a non-contact voltage detector to the insulative cover of the wires.
Loosen the grounding screw off the ventilation fan's box with a screwdriver. Wrap the green or bare wire from the switch around this screw and tighten it down.
Strip 3/8-inch of insulation off the white and black wires coming from the switch. Twist the fan's black wire with the switch's black wire with pliers and install a twist on wire connector on top.
Twist the fan's white wire with the switch's white wire with pliers and install a twist on wire connector on top.