How does one pose the structure of the Earth without visually inspecting it? (We cannot cut it in half.)
How do we know what we know?
Our understanding of the structure of the Earth is through the similar Deductive Reasoning a child employs to determine the contents of a present wrapped in a box.
Energy in the forms of vibrations can travel through matter whether a box (by tapping against) or a planet (earthquake).
The speed of the vibrations can be recorded in the form of sound by a person's hearing or a seismic instrument's recording of an earthquake's vibrations.
In the case of the Earth, Primary (P) and Secondary (S) waves caused by earthquakes can travel through the Earth to other locations on the surface where they can be recorded. The time between the start and the arrival of the waves allows for locations of the layers and their densities. The denser the layer, the faster the waves travel through them.
S waves are a type of shear waves and can travel though solids but are unable to travel through liquids. The Outer Core is a liquid due to the fact that no S waves can travel through it unlike the P waves. The P waves slow down upon entering the Outer Core but speed up on entering the Inner Core due the change from a liquid to a solid.