Heating isn't a problem, cooling is. Most aircraft use "bleed air" from the compressor on the engine. That air is extremely hot (>150°C), so it requires a lot of cooling. Aircraft air conditioners are known as "packs" or "air-cycle machines", as they don't use any refrigerant, just compression/expansion and heat exchange with the outside air. This is also why you can smell oil and jet fuel when the engines start.
Air isn't recycled in to this system because the cabin pressure is too low, but air already inside the cabin is circulated around to avoid it stagnating.