Thermos

How does the thermos know when to keep things hot and when to keep them cold?