It is widely accepted that the Earth’s interior is composed of several layers: the crust, the mantle and the core. Since the crust is readily accessible, scientists have been able to perform hands-on experiments to determine its composition; studies on the more distant mantle and core have more limited opportunities samples, so scientists also rely on analyses of seismic waves and gravity, as well as magnetic studies.
TL;DR (Too Long; Didn't Read)
Scientists can analyze the Earth's crust directly, but they rely on seismic and magnetic analyses to investigate the Earth's interior.
Laboratory Experiments on Rocks and Minerals
Where the crust has been disturbed, it is easy to see layers of different materials that have settled and compacted. Scientists recognize patterns in these rocks and sediment, and they can evaluate the composition of rocks and other samples taken from different depths of the Earth during routine excavation and geologic studies in the lab. The United States Geological Survey Core Research Center has spent the past 40 years amassing a rock core and cuttings repository and making these samples available for study. Rock cores, which are cylindrical sections brought to the surface, and cuttings (sand-like particles) are kept for potential re-analysis as improving technology allows for more in-depth study. In addition to visual and chemical analyses, scientists also try to simulate conditions deep under the Earth’s crust by heating and squeezing samples to see how they behave under those conditions. More information about the Earth's composition comes from studying meteorites, which provide information about the likely origin of our solar system.
Measuring Seismic Waves
It is impossible to drill to the center of the earth, so scientists rely on indirect observations of matter lying below the surface through use of seismic waves and their knowledge of how these waves travel during and after an earthquake. The speed of seismic waves is affected by the properties of the material the waves pass through; the stiffness of material affects the speed of these waves. Measuring the time it takes for certain waves to get to a seismometer after an earthquake can indicate specific properties of the materials that the waves encountered. Where a wave encounters a layer with a different composition, it will change direction and/or velocity. There are two types of seismic waves: P-waves, or pressure waves, which go through both liquids and solids, and S-waves, or shear waves which go through solids but not liquids. P waves are the faster of the two, and the gap between them provides an estimate of the distance to the earthquake. Seismic studies from 1906 indicate that the outer core is liquid and the inner core is solid.
Magnetic and Gravitational Evidence
Earth possesses a magnetic field, which can be due to either a permanent magnet or ionized molecules that move in a liquid medium at the Earth’s interior. A permanent magnet could not exist at the high temperatures found at the center of the Earth, so scientists have concluded that the core is liquid.
Earth also possesses a gravitational field. Isaac Newton gave a name to the concept of gravity and and discovered that gravity is influenced by density. He was the first to calculate the mass of the earth. Using gravity measurements in combination with Earth's mass, scientists determined that the interior of the Earth must be denser than the crust. Comparing rocks' density of 3 grams per cubic centimeter and metals' density of 10 grams per cubic centimeter to Earth’s average density of 5 grams per cubic centimeter enabled scientists to determine that the center of the Earth contains metal.