If its a PWM signal, you'll need to use it to drive the gate of a MOSFET feeding a choke then a reservoir capacitor, with a Schotty catch diode from the opposite rail to the MOSFET drain so it acts as a PWM controlled buck converter to vary the fan supply voltage.
If its a PWM controlled power output the MOSFET and catch diode are probably already present so you'll just need the choke and capacitor. To select suitable parts you'll need to know the fan's full power load current and the PWM frequency.
If the fan has tacho feedeback to the controller, it gets a bit more complex, as that means the buck circuit must be in the positive supply to retain the ground reference for the tacho signal, so it may need a level shifter between the PWM and the MOSFET.,
Ian, good information. In many-to-most of these 3d printers, the fans are simple 2 wire hookups using arduino for sending a pwm signal to the pins (12 volt is more common than 24 volt).
Some simple fans handle partial duty cycle voltages better than others. The common 3d printing slicers (takes an object model and converts it into "gcode" to drive the printer and accessories) include an option to kickstart fans by sending 100% duty cycle for a few moments to get them spinning before switching to partial duty cycle signals.
A common modification for the Creality CR-10 (which is good bang for the buck fwiw) is to change the stock 40mm material cooling fan with a 3d printed "fang" to direct airflow to both sides of the material as it is printed using a 5015 blower fan.
A quick hack that has been used is tossing a small cap across the fan leads to act as a simple noise filter to turn a partial duty cycle square into something closer to a constant voltage... the fans like that a little more.
Mosfets for the outputs on these printer control boards only seem to be common on the bed heaters.
-j