Great question! Scientists know about the
interior through observations of Earth's gravity,
seismic waves, electromagnetic field, and
chondrites, a type of meteorite which formed at
the same time as Earth.
Isaac Newton described the laws of gravitation
between two objects as dependent on their masses
and the distance between them. By observing the
gravitational strength of planets, he determined
that Earth's interior must be much denser than the
rocks at Earth's surface. This was supported
when the first numerical density was determined by
Henry Cavendish in 1798.
Seismic waves provide more focused details
of the structure of Earth's interior.
Earthquakes are caused by the rupturing of cracks
deep underground, which creates elastic waves that
propagate away from the rupture. These waves are
either compressional (P-waves; the fastest,
primary wave) or shear (S-waves; the slower,
secondary waves). As the waves travel through
Earth, they are refracted, or bent (like light
refracted through a prism), when they pass through
different types of material. The speed of the
waves depends on the density of that material.
Therefore, seismic waves tell us that density
increases with depth and that Earth is composed of
several layers. Earth's layers are:
1) a brittle outer layer ranging in thickness
from 5-10 km under the oceans and 25-70 km under
continents, with a complex structure;
2) a dense solid (known to be solid because
both S- and P-waves travel through it) mantle
extending to a depth of 2890 km;
and 3) an extremely dense core, that must have
a liquid outer portion (based on lack of S-waves
and fact that S-waves cannot travel through
liquid) and solid inner portion (based on presence
of both S- and P-waves).
To understand what Earth is made of, scientists
observe rocks that are brought up from Earth's
deep crust and mantle through geologic processes
(like volcanoes and the uplift of mountains) and
through laboratory experiments simulating Earth's
interior. Then the composition of rocks from
Earth's surface and mantle are compared to the
composition of chondrites, because scientists
think that these meteorites were formed from the
same material that formed Earth. The missing
components from chondrites can be used as evidence
for the composition of Earth's core. Earth's
magnetic field further supports that Earth's core
is mostly made up of iron and that the outer core
is liquid. The composition of Earth's layers
supports the density determined by seismic waves.
Therefore, scientists know that Earth's
density ranges from ~2.2 g/cm3 in
silicate rocks at Earth's surface to 13.1
g/cm3 in iron at Earth's center.
And yes, it makes sense.