There is a philosophy that there are four basic needs for survival in the wilderness. Warmth, water, shelter and food make up these four basic needs. The challenge is to put these needs in a priority list. If you are soaking wet on a 45 degree day, then warmth becomes your number one priority. If you are lost in the backcountry region of Painted Desert NP, then water and shelter are almost equally important. If all things were on a level playing field (70 degree days and 45 degree nights with berry bushes to your left and a stream to right) then warmth, water, shelter and food would be the order to set your priorities.
If you entered backcountry in full gear then most of these problems are all ready resolved. You have a tent, and a sleeping bag, as well as a supply of food and water. The real problem is if you went off for a day hike with a minimal amount of gear, or due to a fall or accident have become separated from your gear. Now these four basic needs become a challenge and you need to evaluate your situation.
The first rule of being lost is not to become more lost. That town on the horizon could be thirty-miles away, and there could be a gorge or river blocking your path. Moving through the woods you increase your risk of animal, insect, or snake encounters. The frustration that sets in from all of this increases the panic factor. So rule number one is very simple, hug a tree. The only time you should ever move is because your personal safety is being compromised.
Picking the right tree to hug is also very important. You should try to find a thin spot if you are in a forest, being close to a clearing is best. If an aerial search is initiated for you this will make spotting you much easier. Deep old growth pine forests are the worst for spotting people from the air. Again, don't wander looking for the perfect clearing, you are better off staying put if you don't have the option of a meadow near by.
The primary reason you should not move once you realize you are lost is historically people who are lost and continue to move, move further away from where they should be. There are numerous documented cases of people who have walked completely out of a search area because they were wandering through the woods in an attempt to find a familiar landmark or help. The idea of spending the night in the wilderness with limited or no gear is not a pleasant one, but by staying in one place, and close to your planned route, you greatly increase your odds of being found.