Answer:
There are 3 main reasons.
1. heat from when the planet formed and accreted, which has not yet been lost.
2. frictional heating, caused by denser core material sinking into the center of the planet.
3. heat from the decay of radioactive elements.
I hope my answer helped!