Revise GCSE Physics

Question: When an object loses energy, because heat flows out of it, what happens to the object?

There are two possible outcomes, exactly the opposites of the two possibilities that occur when an object is heated. Either the object becomes cooler or it changes state (only from gas to liquid, or liquid to solid in this case).