The first op-amp produces a crude triangle wave, the second op-amp works as a comparator with it's reference taken from the slider of a potentiometer wired between the 'twr' points. The comparator output is a variable width pulse which is used to turn the MOSFET on and allow current through the motor. As the pulse width is changed, the average motor power is controlled.
The first stage is a mixed-up "triangle" generator that will never generates any signal. Please check with literature and correct the OP input pin assignment respectively. Relaxation oscillator - Wikipedia, the free encyclopedia
Main pwm function is achieved by comparing triangle wave against voltage set by potentiometer. Triangle wave is used because it has slope against time, so on time and off time is easily controlled.
A capacitor is charged and discharged with constant current to produce triangle wave.