People generally get lost in the wild because they become separated from their party, have inadequate navigation skills, or leave the map and compass behind. People who get into real trouble are those who get truly lost and don't have the right skills, food, or gear to stay alive until they get found.
It's important to know some basic navigational techniques, such as how to use a compass and read a map. Make sure your skills are always a few notches above where they need to be for the terrain you are in. Practice in city parks or near trailheads. Always carry essential gear and extra food, or know where stashes of such materials are located.
If you travel at night, use a sturdy seven-foot long walking stick. When walking, keep the stick in front of you to protect your face from branches and to feel for irregularities on the ground. Learning to navigate takes time. Practice is the key and you should get lots of it.
Never go in the wilderness without a map and compass, along with a general idea of where you're going, and where you are. Before departing, always establish an emergency heading to the nearest well-travelled road, that will remain constant no matter where you are.
Never leave your camp or shelter without a heading, and a pace count back. Otherwise, you may not be able to find it when trying to return. When on a gross heading, you can use your shadow to maintain a general direction of travel.
To do this, orient your shadow to the heading you're taking and keep it there while hiking. Since the sun moves approximately 15 degrees per hour, you will need to adjust your shadow's position, related to your heading, every 15 minutes or so.
The east/west arc that the sun travels through the sky each day migrates with the seasons: south in the winter, north in the summer, just like the birds. After the summer solstice (around June 21), the arc moves southward.
If you note the place where the sun rises or sets each day, you will see this point slowly creep along the objects on the horizon as the days go by. This is why the shadows in winter become so long, the days so short, and the sun set seems forever imminent.
It's worth noting, that this change in our angle to the sun is why we have the four seasons. It's so easy to observe that it can be seen while commuting or simply stepping outside and observing where the sun is peaking over the roof of your home. In ten days, the motion will become quite apparent.
After the winter solstice (around Dec. 21), the pathway migrates northward to a position higher in the sky. The sun's rays are striking us more directly and making the temperature increasingly warmer. The sun is the only star you can see move independently in the sky, and this apparent motion doesn't affect the motion or position of anything else.
A useful way to locate objects in the night sky is to use your hand as a ruler. This method has been used for at least 3,000 years -- and it will likely work for you too. Hold your fist at arm's length, and sight over the back of your hand. This spans an arc of roughly 10 degrees (one finger is about equal to two degrees). With a little practice, you will know exactly the width of your hand.
You can use this method to find the one part of the sky that never seems to move; it is around this point that the entire heavens seem to turn. It hovers above the axis that the earth spins on, and you can find it with your compass.
Face directly north, then sight four fist-widths above the horizon (roughly 40 degrees). The star sitting on top of your finger is Polaris, the North Star. This is true north.
The best compass in the world is a less honest north than this star. Though not very bright, it has guided people for hundreds of years. The North Star barely moves and never sets, just as the axle of a wheel can be seen to spin but not change place.
There are many more stars that circle tightly around it, and they never set either. These stars, along with Polaris, are known as the circumpolar stars. You will learn to cherish them and the constellations they form as your loyal guides to the sky. They are easy to see and always visible, pointing the way to other stars.
By night, the simplest way to tell direction is to look at the stars just barely above the horizon. You may have to search a few moments to find a prominent star. To the east, they will be rising. In the west, they will be setting. In the south, they can be seen to move in a flattened, downward-facing arc. This can be observed in only a few minutes time.
It's just the opposite in the north, but it's harder to observe the increasing lack of motion that characterizes the stars as you look northward (a clue that you are looking north), and the North Star will not move at all.
Once you have practiced guiding yourself by the sun and by the stars, you'll be more confident in your travels, and better able to always find your way.