I think these typically do eddy current testing by running an alternating magnetic field and measuring the "drag" the material puts on it. Several metals testers use this principle.
Another one that's often used in expensive scans is sonar, to see for example if there is tungsten put into the middle of gold bars (very similar density as gold). A DIY version is an ultrasonic thickness gauge. Since the speed of sound celerity) depends on the material, this effectively tests the metal all the way through. For coins the "ping" test can be used, since a coin of known dimensions will have very particular harmonics of resonance.
Sometimes x-ray fluorescence (XRF) is used, but this just tests the surface. Since gold is so dense, it only tests a few microns deep. So heavily-plated items will be missed by XRF.
(post is archived)