Vibration waves from earth quakes travel through the earth and have measurable speed. And the different temperatures and fluidity of the various regions of the mantle will change that speed and or reflect the vibration waves in different directions. With multiple vibration sensors around the world the time that it takes for vibrations to travel from one part of the world to another will tell you what is inside.