arduino variable speed fan controller

hmmm
my friend insists that these controllers I want to mimic are varying the speed of the fan dependent of temp. I figured a relay circuit would accomplish the same goal. I figured I would use pwm to tell the switch how much current to let pass. Am I barking up the wrong tree?
should I go with a motor driver circuit with a l293d?

thanks