Will-o-the-wisps and salamanders, although they are everburning enemies, do not light you on fire unless they and you are both standing on flammable terrain. They will set their cell on fire, it will set yours on fire, and yours will set you on fire. The same goes for creatures which have been set temporarily on fire, or for standing next to burning tiles - unless your tile is flammable too, the fire cannot spread to you.
The player can create fire with a Potion of Incineration, a Staff of Firebolt, or with a stack of Incendiary Darts, or by cunningly setting off fire traps (with themselves, with monsters or with thrown items to hold down the trigger). When you wish to get the fire from one place to another a Potion of Creeping Death makes a very effective fuse.
If explosive gas from a bog is set on fire, it will explode. Most clouds of gas created by potions, traps or creatures are also flammable but will not explode (darkness gas and bloodwort spores are non-flammable). Be wary of using a staff of firebolt while standing on flammable terrain as adjacent flammable tiles in the line of fire will ignite and possibly spread to you.
Fire will burn up scrolls lying on the ground. It does not affect other items, nor does it affect your inventory. If you are on fire and step onto a scroll, you will be able to pick it up before it burns, provided that you have inventory space.