Hot and cold packs use chemical reactions to produce heating or cooling effects. Heat packs contain sodium acetate that undergoes an exothermic reaction when mixed with water, releasing heat. Cold packs contain ammonium nitrate that reacts endothermically with water, absorbing heat from its surroundings. These chemical reactions allow the packs to be used therapeutically by providing hot or cold temperature changes.