Generating a sinewave at a fixed frequency is fairly simple.
A wien bridge or phase shift oscillator circuit will work well.
The problems start when you want a wide range of frequencies, the attenuation in the frequency determining network changes and keeping the loop gain at 1 (to maintain oscillation without introducing distortion) gets awkward.
Thermistors or incandescant lamps have been used in the past to adjust the gain.
You are asking for a 1khz to 20khz frequency range, depending on the circuit used, this could be difficult if not impossible to do with out range switching.
Commercial function generators seem to start by generating a triangle wave and then converting that to a sinewave using a shaping circuit.
As Jaguarjoe has suggested, using an IC such as the XR2206 or 8038 or one of its variants is a quick and easy way if you want to stick to the analogue world.
If you want to do 1 to 20khz in one range, consider a heterodyne technique, beating two high frequency oscillators together to create a lower frequency.
Or, more practically, go digital and use a Direct Digital Synthesiser (DDS).
JimB