What could be the cause for my chrysler pacifica engine to overheat? on 2006 Chrysler Pacifica

The engine overheat signal will come on and if I keep driving it will cut off. But when I turn the heat in max and set it so it only blows down at the floor then the overheat signal will go off and the car will run. What could be the problem?

Asked by for the 2006 Chrysler Pacifica