You will have to choose what site to use before you build a fire. You want to select a site that is protected from the wind, sheltered and has a supply of wood or other fuel available. Your site should also be suitably placed in relation to your shelter (if any). There should be nothing nearby that could catch fire.
Clear as much room as you can away from the surrounding area to reduce the chance of the fire spreading. Keep in mind above you as well as around you making sure there are no dead trees around that could catch on fire. If you are in an a wooded area, clear away the brush and scrape the top soil from the spot you have decided on. You can also encircle your fire with stones, or dig a trench. If the area is snow-covered, you can make a platform out of flat rocks or green logs to create a dry foundation for your fire.