Earth has three layers
1. crust - the outermost layer of the earth on which we live ,has a moderate temperature.
2. mantle-the second layer of earth which is not suitable for living.
3. core-chemist dangerous and the hottest layer of earth which contains lava inside it
The internal temperatures of the planets cannot be directly measured, but they can be inferred in a variety of ways. For the Earth we can combine seismic studies and laboratory experiments to estimate the temperatures at various depths. For other planets we rely on heat radiated from their surfaces, surface features which suggest one kind of geologic history or another, theories of the origin and evolution of the planets, and theories of the origin of planetary magnetic fields. Sometimes different lines of evidence yield different estimates of planetary temperatures, but the range of temperatures given below are probably closer to the actual temperatures than not.