Fire and flames are a terrain effect. Your character, monsters and objects will take damage from Burning when on fire.
There are many types of terrain that can burn, including the carpet of poisonous tendrils created by a Potion of Creeping Death. This can make it useful as an improvised fuse.
The player has three primary ways of setting fire directly: Potions of Incineration, a Staves of Firebolt, and Incendiary Darts. Throwing any item into a lava filled square creates a bit of flame which will ignite flammable gases or terrain (webs or rope bridges)