How exactly does fire act in Minecraft?
Like everything else, fire is a block (even if it doesn't look like it). When created, whether by Flint and Steel or when spreading, fire replaces an air block. Blocks adjacent to the fire have the appearance of being aflame and, if flammable, may be consumed (replaced with fire blocks). If a fire has no flammable blocks adjacent to it, it extinguishes itself after a random time; if a fire also has no block of any type below it extinguishes itself immediately. Netherrack cannot burn away, but a fire on top of it will continue indefinitely and not spread sideways.
Which materials are flammable?
Logs, wood, leaves, wool, vines, fences, wooden stairs and bookcases are all flammable, and TNT will detonate when exposed to fire. Chests can catch fire, but are never consumed. In addition, any items on the ground will be destroyed by fire/lava (or explosion).
Within how many blocks of a flaming block can a block catch fire?
Anywhere up to four blocks.
When you're on fire, can you set blocks on fire?
Not by simply running through them, no.
Some other tasty tidbits:
Fire hurts creeps, so a wall of flame (built by putting some netherrack in the ground and lighting them on fire from above) can be useful to protect your base - just make sure you have a way in! Cactii work even better, but they can be hard to find.
Not directly related to fire, but tree- and wood-blocks can also be used an inefficient fuel for minecarts and smelting. I believe they smelt 1 block per block of wood; coal smelts 8 blocks per piece of coal; and a bucket of lava will smelt up to 100 blocks per bucket of lava, but it consumes both the lava and the bucket, and you need to keep the furnace filled before the fire goes out.