The common components of bathroom exhaust fans are the blower itself and a duct leading to the outside of the home. The fan also has some mechanism for turning it on, and this may be an independent switch, a connection to the bathroom light switch or an automatic sensor.
Automatic exhaust fans generally use either a motion sensor or a humidity sensor for activation. The motion sensor activates the fan as soon as someone enters the bathroom and typically runs on a timer for 30 seconds or more after activity has stopped. Humidity sensor models trigger the fan whenever the moisture in the air rises above acceptable levels, and it continues exhausting the bathroom air until humidity levels return to normal.
The exhaust duct of a bathroom fan typically rises through the attic of a home to a covered vent on the roof. Installing such a vent can be troublesome, however, because it involves cutting through the roof and potentially creating leaks. Bathroom vents near outside walls may be vented horizontally to the outdoors, but this can require complex duct work for central bathrooms. In no case should bathrooms simply be vented into the attic space, as this can lead to wood rot.