If the fan only has two wires, then they eventually use a trick to make a digital RPi pin analogue, because RPi only has digital pins. The trick is described here: Click!
I would still try to replace the fan. It's a cheap thing.
PS: It's also possible that they use a DAC to trigger the fan. Then also the DAC could be broken, but usually cheap fans are the issue.