In general, a backfire is a combustion explosion occurring in the wrong place---either the intake or the exhaust systems, rather than internally, in the engine itself.
Most backfires are caused by problems in the air/fuel mixture---either way too lean or way too rich. Also, an intake valve that is burned (not sealing) or engine-timing that is way off (slipped timing chain or belt) could cause combustion gases to escape into the intake manifold.
Here's a summary from WIKI that isn't too bad at all:
Poor or unregulated engine timing is often a cause of intake backfires, but can also be responsible for exhaust backfires
Improper wiring in the ignition can also lead to timing issues and backfires
Low fuel pressure, clogged fuel filters, and weak fuel pumps could cause a severe lean air-to-fuel ratio during fuel injection
Missing or damaged catalytic converter can result in backfires out the tailpipe