The most basic setup is 12v(yellow wire on PSU) --- Potentiometer --- Fan --- Ground(black wire on PSU).
That's pretty inefficient, but it'll work just fine(assuming that your potentiometer has a high enough rated wattage to deal with the heat it will be generating. Never a bad idea to give it some airflow and/or direct contact with case metal).
There are more sophisticated designs; but this will work for a start.