Geothermal energy is heat generated inside dense and rocky cosmic bodies. It can be generated by the immense pressure in the core of planets and created by nuclear processes and is constantly available with virtually no limit in time.
On Earth there are a few installations that use geothermal energy for heating and for the production of electricity. On Mars there might be usable geothermal energy as well. It is unknown how deep a Martian settlement would need to drill for practical Geothermal energy.
Mars Global Surveyor has found relatively fresh signs of flowing water in the Cerberus region near the equator of Mars. This probably happened 10 million years ago, which is geologically an extreme short time. Hopefully, the heat is still there in certain spots.   Martian Volcanoes are obvious examples that Mars once had large amounts of geothermal energy available and Mars still has a molten core. Therefore there might be some geothermal energy available. The cost of reaching that energy has to be compared to the cost of other energy sources to know if the use of geothermal energy on Mars is practical. Since the atmospheric pressure and surface temperatures are very low on Mars, water from underground aquifers could be used by steam turbines to produce electrical energy.
Heat generated in the martian mantle and core has been estimated at an average 20-30 milliwatts per m2. The solar heat flux at the martian surface reaches 600 W/m2, roughly a twenty thousand time higher energy flow. So at first glance solar power seems more practical. Taking into account solar storms and nights as well as solar cell efficiencies actual average solar electricity availability might be about 40 W/m2 , still about 1000 times more. A geothermal energy source on Mars would need to be a geological anomaly, such as some form of magmatic intrusion near the surface. Are there spots with usable geothermal energy? Additional exploration on Mars is required to identify possible sites.