What is the difference between an air conditioner and a heat pump?

An air conditioner if functioning as air warmer or air chiller can be called as a type of heat pump. If an air conditioner is working as an air de-humidifier then it no more a heat pump.