Heat is energy, you are correct. Here is an analogy. Think of temperature as a kind of measure of an atom's velocity. The faster an atom jiggles the higher it's temperature. So far so good? Now let's take the analogy one step further - if something has a velocity, you can calculate it's kinetic energy by computing 1/2mv^2 right? In the same way, using our analogy, one can calculate heat from temperature. The equation is H = cT (where c is a constant, I forget what it is called, heat capacity I think). So, finally, to answer your actual question - as heat "flows" what is really happening is molecules of higher velocity (and therefore higher temperature) are ramming in to molecules of lower velocity. Since work is a force x a distance, one can imagine in our analogy that work is being done on that slower atom by the faster atom as they smash (that's the force) over some - very short I'm guessing - distance. By doing work on the slower atom it's velocity increases, meaning it has a higher temperature and more energy (just as, say, a car with a higher velocity has more energy than the same car at a slower velocity). Pardon the long answer.