It seemed appropriate to ask this question in regard to this specific type of foot warmer because if you did not know, you would really have no clue how they work. Basically, the packets include a mixture of ingredients that when exposed to the air (which is why they need to be shaken) will produce heat. While the ingredients may change based on the model, a fast oxidation process is what happens.
The ingredients could include water, iron powder, salt, and even charcoal and then they can combine to create heat (with the addition of air).