The trick is "the other coil NEXT to it". The metal detector needs these two coils, induction and pickup, be located close to each other but shifted in the common plane, so the pickup coil output is close to zero. Some capacitive transfer remains but you can use a screen strip to reduce it.
Then, if you put any metal or dielectric object in the "common" field, the balance is broken, and the pickup coil output increases.
Some metal detectors use more than one pickup coil, connected so that no output is obtained. Varying the frequency one could even detect different-conductivity materials, dielectrics, etc.