As mentioned earlier the fan at the front of the engine is driven by the low pressure turbine at the rear of the engine and is a free spinning rotor assembly. If you could see up the back of the engine you'd be able to see the turbine spinning at the same time the fan is.
If the wind is down the front of the engine the fan/turbine will spin in the normal direction but if the wind is from behind the engine the whole lot will spin backwards.
In all multi spool jet engines the inner or high pressure compressor and turbine and burners etc is the bit that does the work that generates the hot gas which drives it, and the low pressure turbine and fan. Accessories such as the generator and hydraulic pump are gear driven from the high pressure rotor.
Regards,
BH.