There are many ways of making an oscillator. The simplest I have made uses a CMOS 4093, one resistor and one capacitor. You could also use a blocking oscillator (one transistor and an inductance), a bistable (two transistors) or Wein bridge oscillator (one op-amp).
I am not up to the latest in metal detectors but the early ones used the search coil in an oscillator which varied in frequency and compared this with a fixed frequency oscillator to give a whistle.