I believe they run a heat conductive fluid through heat exchange coils in the ground. This allows you to pump heat into the ground during winter and extract said heat (not sure how accurate this is) during the winter.
If above ground ranges from 0-100 degrees F, underground likely ranges from like 64-68 degrees F, which makes it really energetically "cheap" to get to your preferred temperature range, heating to idk 70 at most and cooling to probably not even 65.