Brooke. When earthquakes occur ( For how they occur see this question) you get a seismic wave travelling outwards from where it occurred. Imagine an explosion, a rock cracking a noise bigger than anything you have experienced. It would create the biggest sound ever, shake the ground more than it has ever been shaken and send a signal to the rest of the Earth that the earthquake had happened. It is this seismic wave of spreading energy that has helped scientists discover the structure of the inner Earth. The waves spreads out in all directions and some of them pass through the centre of the Earth. If you look at the waves on the other side of the Earth you can examine them and find out what they have travelled through.
It is now thought that the temperature of the inner core is close to 7000 degrees K (Kelvin). It is however not a liquid , because of the pressure of all the stuff on top of it. It is therefore a solid iron core at about 7000 degrees K…which is close to the outer temperature of the Sun.
(0 degrees K=273 degrees Centigrade so 100 degrees Centigrade = 373 degrees K )