For years, most homes were designed with a separate furnace and A/C unit. This system worked, but required more equipment more maintenance, and potentially led to more problems. About 30-40 years ago, HVAC engineers designed the heat pump (technically, the reversible heat pump) and integrated these two systems together in the same unit.
Think of how an A/C system operates – it relies on a closed-loop cycle of compression of a gas refrigerant to a liquid state, which then evaporates again to a gas and provides cooling through that evaporation. It’s the same principle that a refrigerator or automotive A/C uses.