A Closer Look
Both baking soda (sodium bicarbonate NaHCO
3) and washing soda (sodium carbonate Na
2CO
3) are bases. Vinegar (acetic acid C
2O
2H
4) is an acid. When either baking soda or washing soda is mixed with vinegar, they react to form liquid water (H
2O) carbon dioxide gas (CO
2) which is the source of the bubbles, and disolved sodium acetate (NaC
2O
2H
3). Heat helps to speed up this reaction and causes some of the liquid water to turn into steam. As more water evaporates into steam, it leaves behind the sodium acetate.
Eventually there is so much more sodium acetate left behind than water that it begins to turn solid. when you add heat, you're giving energy to the molecules of sodium acetate. The moving molecules can't latch on to each other to make the organized structures that make up crystals. Adding a few grains of sodium acetate powder provides a little organization to the liquid, and the molescules are able to line up to form the crystals.

As the solution crystallizes, the molecules slow down and give off that extra energy as heat. Because sodium acetate is so good at this, it is used in some kinds of commercial instant hand warmers. We use a few on them here in OMSI's Chemistry Lab!
These commercial hand warmers use a metal plate within the enclosed solution. When bent or rubbed the plate will irritate the solution and cause crystallization to occur. Instant warm hands! These can be melted back down to the original solution and used again and again.