Click on the link below for the answer.
Common metal detectors work by sending out a radiofrequency energy signal. This frequency will change slightly when the 'antenna' is in close proximity of various metals.
Many metals will absorb this energy. The detector notices this absorption and can these days indicate what metal it is and even the distance to the metal.
Some metals also reflect this energy signal and when a reflection is picked up, this can also be used to indicate type and size of metal object.
High tech detectors use a combination of many methods of which increases its accuracy drastically.
Basically,in the case of metal detectors used to search the ground, a signal pattern is transmitted from the search coil into the ground. When the signal comes in contact with metal, there will either be an audio signal, a flashing light, or vibration.The same applies for metal detectors used in security checks.