A heat pump will do both the cooling and heating.
When it’s cold outside a heat pump extracts this outside heat and transfers it inside. When it’s warm outside, it reverses directions and acts like an air conditioner, removing heat from your home. One advantage of a heat pump is that it moves heat instead of generating heat, giving you more energy efficiency.
Heat Pump Operation Explained