 We've learned so far that heat is a form of energy. If you want to warm something up, you have to add energy to it to make the atoms vibrate faster, to make the springs stretch more, to make the molecules rotate more, whatever. So when we study flow of heat from one thing to another, we're really studying the flow of energy. And there are two fundamental laws we need to concern ourselves with here. The first one is called the first law of thermodynamics. It can be written in many ways. The way I'm going to explain it is energy is conserved. Now what does that mean? Something is conserved means it's not created or destroyed. You always have the same amount of it. All you can do is move it from one place to another. So what that's telling you is if you want to warm something up, it's going to need more heat energy, as we've worked out with latent heat and specific heat capacity. And that energy is going to have to come from somewhere. Maybe it would come from a chemical reaction in burning some gas. Maybe it would come from electrical energy in a heating element, but it has to come from somewhere. Likewise, if you want to cool something down, the energy has to go somewhere. If you take something hot and it cools down, then energy must have gone into something else, usually warming up the surroundings. So that's the first law. Energy is conserved. If you want to change the energy in something, you have to put energy in or put out, but it has to come from somewhere or go somewhere. The second law, the second law of thermodynamics, basically says that heat flows from hot to cold. Once again, it can be written in many different ways, but this is perhaps the simplest way. The basic idea is let's say you have two objects, one of which is very hot, and one of which is freezing cold, and you put them next to each other. Heat energy will go from the hot object into the cold object and never the other way around. So the hot object will get cooler and cooler and cooler, and the cool object will get warmer and warmer and warmer, until they balance out at the same temperature. If you just knew the first law, you'd think the other way around might happen. It might be that the heat energy would go from the cold one into the hotter one, to the colder one would get colder and colder, and the hot one might get warmer and warmer and warmer until it exploded like a supernova. But no, that never happens, and that's because of the second law of thermodynamics. There are many examples of this. For example, when it's a cold day and you get a mug of hot tea in your hands, the tea will cool down your hands and get warmer. The hot tea doesn't suck the heat out of your hands and make them freeze sort of while getting boiling itself. Likewise, if you, for example, put ice cubes in a drink, the ice melts, so heat is flowing from the water into the ice. It never goes the other way around. In principle, I suppose you could put ice cubes in, and the ice cubes will get colder and colder and bigger and bigger while the rest of the water left over starts boiling, but you never see something like that. The final state that things end up in is what's called equilibrium. This is where everything has come to the same temperature, so heat has flowed from whatever's hot to whatever's cold until they all end up. And that's where everything generally likes to end up.