Geothermal, Nuclear and Tidal* are sources which don't rely on the Sun. Fossil fuels are solar energy that's been stored for millions of years, Solar and Wind rely on the sun.
* OK the sun has a small affect on Tidal but the moon has more of an effect - and there's about 10^30J of energy in it's orbital energy, enough to power human civilization for billions of years
That's nothing compared to the sun of course, which puts out about that amount of energy every hour.
Which in turn is originally heated by the sun.
Further down (maybe 1000m under ideal conditions) the heat comes from the core.
I may add that in Sweden this kind of heat pumps are abundant. I have one with a 150m drill hole.
But yeah - this is coming from inside, not outside.