Metal detector works on the principle of transmitting an electromagnetic signal and analyses a return signal from the target. So it works on the principle of resonance in AC circuit.
When the LC circuit detects any resonating frequency from any metal which is near to it, electric field will be created which will lead to induces current in the coil and changes in the signal flow through the coil.