If you find yourself in a survival situation, the most important thing to do FIRST is find or build a shelter. Shelter trumps water, fire, and food. An easy way to remember this principle is the rule of threes. You can survive for three hours without shelter, three days without water, and three weeks without food.
Most people who die in the wilderness die from exposure to the elements, not thirst, or starvation. Therefore, unless rescue is expected to take more than three days, the victims need not consider water or food - only good shelter. Therefore focus on shelter and warmth and than stay put until rescued.
Shelter in Snow
In deep snow, try to dig a snow cave and use that for shelter. Within the snow cave make a sleeping platform higher than the floor. This will keep you warmer, especially when you do not have a proper sleeping pad. Try to place something (a blanket, leaves, pine needles, boughs) on top of the platform so that you do not sleep directly on the snow. Block the opening to the cave with a backpack or something to retain warmth inside.
In snow that is not deep enough to build a cave in, you can build a quinzhee, which is similar to an igloo, but takes less time and skill to build. Piling up some stuff and start shoveling snow on top of it. It may take a while to dig ant gear out again, so be careful about what you bury. Piling stuff inside really reduces the amount of snow you need to stack and the amount of digging later on. Your pile of snow needs to be at least 2.5 meters wide, and 2 meters high. Once the snow is in all in place, let is sinter for an hour or two. Sintering is the process of the snow particles binding to one another.
After several hours you can gather some sticks and break them into 30 cm lengths, inserting them into the snow dome as wall thickness indicators.
Now you proceed much like you would build a snow cave. Begin digging a door, and tunnel in until you reach the pile of stuff in the middle. Extract you gear. Hollow out the inside, using the sticks as a guide. Smooth the walls as you go because as snow melts inside it will run down the smooth walls instead of dripping on your head in the middle of the night.
Cut three or four vent holes in the ceiling to allow the CO2 and carbon monoxide to escape. Removing some of the sticks placed earlier should help create the required vents.
Digging is hard work so remove a layers of clothing to keep cool. When you are done, change into some dry clothing to avoid hypothermia.
As with the snow cave, make a smooth sleeping platform so you are above the lowest point where the coldest air collects. Again, block the entry with a backpack.
Start by gathering stones, and build two walls as high as you want the shelter to be. Remember you don't need to sit or stand in your shelter, just lie in it. For safety make the walls at least as wide as they are tall. Make the shelter a little longer than you are tall, and about twice as wide as your shoulders and hips.
Once your stone walls are finished, place a tarp over them if available. It is best if the tarp roof covers the stone walls you just built and lies on the ground on either side. Pile rocks on the part of the tarp that is lying on the ground to secure it from blowing away. Use a stick to prop up the tarp and create a slooped roof so that rain will run off and not collect on the tarp.
In rocky areas you may also be able to find a cave or large rock to camp under (but make sure it is not going to fall on you).
Swamps and marshes
If you find yourself in a swamp or marsh try to find higher ground. However, if you have to shelter in a swamp or marsh, build something to get you off the ground. One option is a platform built by finding two trees at least 20 cm in diameter and about 2.5 meters apart. Then using square lashing, attach two long poles to either side of the trees, high enough to keep you out of the muck. Use continuous lashings to lash several shorter poles across the support poles to make the platform surface. The short poles should all be as close to the same diameter as possible, or if that's impossible, arranged from smallest to largest to make a fairly even surface. The lashing must hold your body weight plus your gear so be careful how you do the lashing and test as you go. If you do not have rope you may be able to make rope from native materials.
Alternatively, you could use a tarp to create the platform much as you would create a litter for carrying an injured person. If you have a tarp on hand, streach it over your platform to keep the rain and sun off your body.
If you need to shelter in the forest, build a lean-to. Find a couple trees (hopefully bent over) or rock face and than build a roof by stacking wood across the opening. Finish by covering with moss or forest debris. The exact design will depend on available materials but the idea is to provide a shelter from rain and sun.