The temperature of the earth's core is so high mainly because "it contains radioactive materials which release heat as they break down into more stable substances."
The core is also under an enormous amount of pressure. In March, 2007, using a new method, scientists estimated the temperature of the core to be about 9000 degrees farenheit.
Why we do not know the exact reason as to why the interior of the Earth is hot, there are several leading factors:
We do know that the Earth is cooling, which can lead us to believe the Earth's initial heat came from when it originally formed.
The second factor for the interior heat of the earth is the decay of radioactive elements. (This is happening in both the mantle and core) Even though these elements are contributing to the Earht's interior heat, the Earth is cooling faster than the decay of these elements can increase the heat.
There are three main sources of heat in the deep earth: (1) heat from when the planet formed and accreted, which has not yet been lost; (2) frictional heating, caused by denser core material sinking to the center of the planet; and (3) heat from the decay of radioactive elements.