The first opamp generates a 1Khz square wave this then feeds a low pass filter ( Sallen Key 3rd order ) with a cutoff frequency of 250Hz, this will remove most of the harmonics of the square wave leaving behind the 1 KHz fundamental , the third opamp increases the output amplitude which can also be varied ( the amplitude ) with the potentiometer.