PROBLEM TO BE SOLVED: To provide an underground heat storage type heating and cooling apparatus for controlling at a low cost, soil temperature near a root area in a greenhouse.SOLUTION: This heating and cooling apparatus is so formed that pipes are laid near a root area in the underground in a greenhouse, and on a place deeper than there, and heat in the greenhouse is sent into both the pipes by a heat pump device. Heat is supplied to both the vicinity of the root area and a heat storage layer deeper than there by an operating mode 1, and when reaching a prescribed upper limit temperature, heat is stored only in the heat storage layer by switching to an operating mode 2, and as a result, it is possible to prevent an excess increase of a temperature near the root area, keep a suitable temperature for plant growth, and sufficiently store heat. When a temperature in the greenhouse falls below a prescribed lower limit temperature, air in the greenhouse is warmed by driving the heat pump device 50 by an operating mode 3 in a reverce cycle of the cycle of the operating mode 1 or 2, and by using heat stored in the heat storage layer. When a temperature near the root area decreases, the vicinity of the root area is warmed by heat stored in the heat storage layer by an operating mode 4.