Water freezes when it gets cold—that is, when energy is removed from it. Ice melts when it gets warm, or when energy is added to it.