This will keep a small campfire from spreading. Never leave a fire unattended. Be aware of the weather conditions. Wind can fan flames and carry embers. Keep water handy.
Quick action can prevent a fire from spreading to the surrounding area.
Make sure your campfire is completely out before you leave or go to sleep. Douse the embers with water, break them up, then douse them again. If you're caught in a wildfire, the best strategy is to find shelter. Don't try to outrun the fire. If you can, get to the flanks or into a burned area.