Controlling PC cooling fan that has a PWM input

Thanks, Now how do I program the clock/counter to 25kHz and what is the value I use to vary the speed...0-255?
What pin will this effect?
I have a mega 2560
Thanks