davidkhan:
what i have to do if i just want to turn on the fan how to connect these two wires
You will need a transistor (either n-mosfet or npn bjt), to switch the external supply already mentioned in #1 and #2. This example shows a mosfet, but the bjt set up is similar.