You don't need to drill any mile down to do that in most of the USA.
The temperature of the ground six or eight feet down in most areas is the same as the average air temperature over the course of the year.
So if you dig down the appropriate distance and lay a bunch of pipe, the water that comes out the end of the system will be at (about) average air temperature for the year.
Here's a link to a map for US annual air temperatures.
http://www.maps.com/ref_map.aspx?cid=680,747,1304&pid=11583
(I don't know how to post pics.)
Designing such a system is not for the faint-hearted. Dramatically affected by soil type, water table level and a bunch of other factors. But the basic principle is valid.
If you look at the map you can see ground temperature won't provide effective AC in the South, and it sure won't heat the house in the North.
Ignore the map I posted. It’s for average air temperature in January.
Surprisingly difficult to find an annual average temperature map.
Here’s a vintage version. 1887.
http://www.etsy.com/listing/26672589/1887-temperature-and-rainfall-map-of-the
It looked like that link was for a poster showing average January air temperatures.
You’re right about ground temp being average annual ambient temp. For most of the continental US, the temperature 3 feet down and deeper, is about 50-55degrees. If you go into Mammoth Cave in KY, it’s about 54 degrees year round, if you go into Jewel Cave in SD it’s about 50 degrees year round. If you dig a 4’ deep trench and put a water pipe at the bottom and then recover it, the water in the pipe will stay about 50-55 degrees year round.
Geothermal heating systems don’t dig down to magma or whatever. They rely on the difference between air temperature (-20 to 110 degrees) and ground temperature (50-55 degrees). Most systems use a heat pump to take water from the pipes in the ground and either transfer heat into that water from the surrounding air or to use that water to heat the surrounding air. The cool thing about the heat pump is that if you have a large enough sink (i.e., a couple hundred gallons of water running through the earth outside of your house), you’re not limited to merely keeping your house at ground temperature — in the winter there is enough heat energy in the sink to keep your house pleasant. In the summer, the sink can be used to absorb and dissipate excess heat energy in your house.
The heat pump uses electricity to pump water through the system and to power an exchanger. These systems can work pretty much anywhere. In extremely cold climates where ground temperatures are low year round, the amount of electricity necessary to run a heat pump to extract useable energy in the winter would be more efficiently used in directly heating the home, so it’s not cost effective. But the system can work anywhere.
Drilling for a geothermal well is a different option that isn’t trying to use the ground passively as a heat sink.