Summarize:

If the season or region is particularly dry, there might be restrictions on when, where, and why people can light fires. Check the local fire restrictions online or at a ranger station before you go. Some areas require you to register a campfire permit. You may only be able to build fires in designed "campfire" spots. Respect the fire restrictions. They are in place for a reason! Only you can prevent forest fires. In the U.S., many National Forest and Bureau of Land Management areas require you to carry a permit for building a flame outside of a designated fire pit area. Visit any Forest Service, Department of Forestry and Fire Protection, or Bureau of Land Management office to ask for a permit sheet. In some areas, such as California, you can download a campfire permit online. In order to protect your fire from the wind, you should build your campfire on ground that is lower than the land around it. Consider setting up the fire in an alcove against a rock or cliff face that will protect the flames from the wind – but be careful not to leave burn marks on the rock! Make sure that the ground is dry, and that there is no chance of your spot being exposed to rain.  If you are in a forest, look for a large clearing and build your fire near the center. This way, the flames won't lick too close to the surrounding trees. If you're expecting rain, you have two options: build the fire within a natural shelter, like a cave or an overhang; or tie up your own protective cover using a tarp or a tent fly.
Make sure that you can legally build a campfire. Acquire a campfire permit, if necessary. Find a low, dry, sheltered space.