You can typically simply connect the PWM input to a GPIO providing a 25kHz PWM signal. I don't agree with the other answers, which all mention to keep Vcc within the logic level of the Pi, which from my experience is not neccessary! Fan controllers in 4-pin fans have an open collector input for PWM control and thus are made to be controlled by typical logic levels, newer models of reputable brand are sometimes explicitly compatible with 3.3V logic using pullups to 3.3V, respectively.
There are many products on the market and to be absolutely sure if your individual fan is fine to work with in this way, you should connect PWM to ground through a large resistor (10kOhm) and measure the voltage at the PWM pin when the fan is connected to 12V and GND. If the PWM pin within you logic level, you're fine to go.
Also, unlike mentioned in a comment, you don't need an ADC to read the tacho signal: it's a pulse signal (also open collector signal) that generates to drops to GND per revolution. All you need to control a 4-pin fan is 1 (or maybe 2) pullups of around 10kOhm.