The use of renewable energy sources (RES) around the world and in Europe is increasing today. The reasons for this can be found primarily in the reduction of greenhouse gas emissions and the reduction of dependence on energy and energy imports. One of the uses of renewable energy is also geothermal energy. This energy is abundant on Earth, but its utilization is still very low. Geothermal energy is mostly used for heating, but in recent years we can see an increase of heat for electricity production. The Earth's interior contains heat that can be removed by means of a downhole heat exchanger. The downhole heat exchanger is built into the well which is filled with injection mass. This system of heating and cooling of buildings is closed system, because the medium by which heat is supplied to the heat pump does not come into contact with rocks inside the Earth.