Are there substances people can put on themselves to prevent catching fire?
It depends how long one is exposed to heat, and how hot the source is, but yes, there are "fire retardants" for skin:


A mix of alcohol (ethanol or isopropanol) and water or butane in soap sud can be set afire on your palm without burning you, if done very carefully. The water soaks up heat energy both because of its high specific heat and through evaporation.
Insulation applied to the skin or between skin and flame can protect (momentarily) from a torch.
A wet hand is temporarily protected from molten lead by the leidenfrost effect. As water on the skin boils, it acts, briefly, barrier to the heat.


NB: Do not try these experiments yourself (or on others). You get no points for being a crispy critter.