an area will be safe - do your research in advance.
if you get buried in a remote area and know there's no one around to dig you out, your only chance of survival will be to dig yourself out. it can be difficult to tell which way is up, so if you can see any light, try to dig toward it. if you can see your breath, dig in the direction that it rises. you can also -- though it sounds gross -- spit in your hand and see which way it runs, then dig the opposite way.
if you can't get out of the path of the avalanche and you 