If your fan is a 5v fan you need 5v (or 3v for slow spinning) and ground pins. If your fan is a 3v fan DO NOT use the 5v pin: use 3v instead.
Raspberry pi has an utility called pinout which tells you the phisical layout of your board. Just open a shell and run:
The output will be something like:
If you prefer to trust documentation, this is the ...