Summarize:

Your fire pit should be constructed on bare dirt. If you are at a location that has a designated fire pit area (like a campsite), you should build your fire there. If you are in a more uninhabited area, you should clear away any flammable woodland debris extending at least 8 feet away, and build your bonfire there. Make sure your fire pit is not directly under any tree branches or hanging plants. Scrape away at the area you intend to make your bonfire. The center section where you intend to build the fire should be a little depressed so the fire is more controlled, and the ember ashes have somewhere to fall.  This will also help the wood fall in on itself rather than falling outward. Be sure to remove any leftover ash from previous fires. This will provide your bonfire with a clear base from which to start. Position rocks in a circle around the area you intend to build you fire. The rocks contain the bonfire while setting a boundary between the burning wood and flammable items. It is always a good idea to have a fire extinguisher nearby when building a fire. You may also want to consider keeping a bucket or two of water near your fire site. This will provide a backup for immediately putting out the fire, if need be.
Clear a space for your fire pit. Dig down into the pit. Set a perimeter of rocks. Prepare extinguishing tools.