Bathroom extractor fans will typically have two connection points - one inside the unit itself - the one best for disconnection.
And another in the ceiling rose - where the lamp hangs down.
There are usually three wires - live and neutral to drive the fan and switched live from the light to trigger operation when the light is turned on - turning the light off will not stop the fan - it runs on a timer.
Do not be tempted to disconnect the wires at the lamp - just mess with the wires in the extractor enclosure.
Alternatively call in an electrician - it's safer