Great question! I will tell you right off the bat that I have been lost before, and it will happen again if my head isn't on right. "Lostproofing" starts with being aware, and then extends out to having solid map and compass/GPS skills. If you are out hiking and you're not paying attention to your surroundings, then you have a good chance of getting lost. Or, as we survival instructors say, "getting turned around." (It sounds less damaging to the ego.)
I am going to preface the following tale by saying that I was much younger when this event took place. I was hiking with a good friend through a swamp in northern Michigan. We were in search of an elusive goldmine not on the map, so bushwhacking was necessary. Even though we were experienced woodsman and knew well how to read a topo map (navigating around berms and mud-choked drainages), we still managed to get lost, because we spent more time talking and dreaming of piles of gold nuggets then anchoring visual landmarks in our psyche. Again, our awareness had lapsed.
It would have helped tremendously if we had marked our route with some pink or orange flagging tape. In the end, we got back, albeit with empty pockets, because of our map-reading skills. That, and we were driven by the fear of being in the local news. ("Two survival instructor went missing today when ")
So, the moral here is to pay attention to your surroundings when hiking, particularly noting prominent landmarks such as boulders, powerlines, valleys, etc These will become your reference points on your return hike out. Then become acquainted with how to read a topo map and use a compass. A GPS is handy but it is prone to failure and is NO substitute for good mapreading skills. Lastly, don't search for elusive goldmines.