Pick a spot that makes it easy to create your shelter. Two trees close together makes for an easier lean-to.
Use available spaces, such as rock faces that curve out, and other locations to shelter you when possible. Check for signs that your preferred spot also shelters wildlife first.
Don't build your shelter in a game trail, or any other place the local fauna may be likely to investigate, such as a berry bush in bear country, for example.
Try to find a space close to a source of water and where you can forage easily.
Keep an eye on changing conditions. That convenient stream may turn into a rampaging river if there are heavy rains upstream.
Don't Set the Roof on Fire
A fire is good, a shelter is good, a shelter on fire is bad. Strike a balance between the fire being close enough to keep you warm, yet not so close the shelter starts to burn.
A couple of well-placed logs can keep you from rolling into your fire.
Likewise, a couple of well-placed warm rocks can help you stay warm.
Gather twice as much firewood as you think you will need. You will need it, and then you don't have to look to your shelter for firewood.
Timing is Everything
Building a shelter, even a simple lean-to, takes more time than you might expect. Start early.
Be looking for good places to shelter as soon as you know you'll need one. Once you find a place, start building.
Night and storms can both come on quickly, and neither are conditions you want to build your shelter in, so watch the sky.
Use What You Have
If you're in a pine forest, a bed of pine needles is better than the ground, and the boughs can help keep the rain off.
If you're surrounded by sticks, build a lean-to.
If you're out in the snow, dig a snow cave. (Or, if you have the right kind of snow and know what you are doing, an igloo works too. But snow caves are easier as long as you remember to put in a cold sink, which is a trench below the level where you will sleep which traps colder air.)
If you have a tarp or a poncho, but no stakes, sticks make a good substitute.
A tarp or sheet of plastic makes a good addition to the roof in case of rain.
Things To Take With You (If You Can)
A hatchet may not be quite as powerful as an axe, but it fits a lot better in a backpack. Though if you're planning on heading into the backwoods, take the axe.
Twine is also something lightweight and easy to put into a pack, plus it has the added use of being great fire-starter if you take the time to spread out the individual strands.
Matches, or a lighter, even if you don't smoke, can be of enormous psychological value, not to mention handy when it comes to lighting a fire.
A knife, preferably of the Swiss variety, or some form of multitool, should be standard in every pack, even on a day hike. Borrow a lesson from the Scouts and "be prepared."
A rain poncho can be used as a roof or a blanket in an emergency. For that matter, many emergency or "space" blankets are lightweight enough to be worth packing.