When the logs in your fireplace start to go out, poking at them will often start things going again.
Likewise, fanning the logs can make them burn brighter, even if the fanning temporarily extinguishes the flames.
When a log burns, it goes through several different phases. Your fire starts when you light some kind of pilot heat–usually crumpled up newspaper or kindling. This dries out the log, and warms it up. Some of the wood’s oils, alcohols, and resins begin to boil off as a gas, and this gas gathers in a cloud around the log. Meanwhile the log begins to scorch–a process that turns it black and breaks the fuel molecules inside into smaller pieces, making them easier to burn.
At a crucial point, the gassy cloud around the log catches fire and begins to flame. Once this happens, the log will continue to burn, even if the pilot heat is removed. The burning gas cloud boils off more gassy fuels inside the log, making it pop and sizzle.
After a while, the gaseous fuel burns away. All that’s left is charred wood. This still burns, but it doesn’t produce flames. Instead, the fire becomes a glowing, red zone that turns wood into a layer of suffocating white ash.
Why suffocating? Every fire needs oxygen to burn. When the ash layer gets too thick, it’s hard for the oxygen to get through. Poking at a log helps, because it knocks away this ash barrier, letting fresh air onto the burning log’s surface. Fanning helps for the same reason. It might even heat up a new section of wood, releasing more gas and starting the flames again.