Seek shelter immediately...If you are a few miles out, you will have about 10-15 seconds until the heat wave hits you, and maybe 20-30 seconds until the shockwave does.
Do not look at the fireball and cloud. Under no circumstances should you look directly at the fireball. On a clear day, this can cause temporary blindness at very large distances.[5]
If you can't find shelter, seek a depressed area nearby and lay face down, exposing as little skin as possible. If there is no shelter of this kind, dig as fast as possible. Even around 8 kilometers (5 miles) you will suffer third degree thermal-burns; still at 32 kilometers (20 miles) the heat can burn the skin off your body. The wind itself will peak at around 960 kilometers per hour (600mph) and will level anything or anybody caught in the open.
Failing the above options, get indoors, if, and only if, you can be sure that the building will not suffer significant blast and heat damage...Stay away from any windows, preferably in a room without one; even if the building does not suffer substantial damage, a nuclear explosion will blow out windows at enormous distances.[6]
Wear cotton clothes...Substances like nylon or any oil based material will ignite from the heat.
Remember: it's not the initial blast that creates the high death toll; it's radiation exposure....The fallout may rain down as contaminated black soot known as "black rain," which is very fatal and may be of extreme temperature. Fallout will contaminate anything it touches.
Once you have survived the blast and the initial radiation (for now at least; radiation symptoms have an incubation period), you must find protection against the burning black soot.
Standard clothing will help protect you from Alpha particles.
Beta particles...pose a serious threat, however, to the eyes, should they be exposed for a prolonged period. Once again this is harmful if ingested or inhaled, and clothing will help prevent Beta burns.
...Avoid exposure to Gamma radiation. Try not to spend more than 5 minutes exposed. If you are in a rural area, try finding a cave, or a fallen log into which you can crawl. Otherwise just dig a trench to lie in, with stacked earth around you.
Begin reinforcing your shelter from the inside by stacking dirt around the walls or anything else you can find. If in a trench, then create a roof, but only if materials are nearby; don't expose yourself when not necessary. Canvas from a parachute or tent will help stop fallout debris from piling on you, though it will not stop Gamma rays...Use the following to help you determine the amount of material you'll need to reduce radiation penetration to 1/1000:[8] Steel: 21 cm (0.7 feet), Rock: 70-100 cm (2-3 ft), Concrete: 66 cm (2.2 ft), Wood: 2.6 m (8.8 ft), Soil: 1 m (3.3 ft), Ice: 2 m (6.6 ft), Snow: 6 m (20-22 ft)
Plan on staying in your shelter for a minimum of 200 hours (8-9 days). Under no circumstances leave the shelter in the first forty-eight hours. Ration your supplies. You will need to ration to survive, obviously; therefore you will eventually expose yourself to the radiation (unless you are in a specific shelter with food and water).
Processed foods are okay to eat, so long as the container has no punctures and is relatively intact. Animals may be eaten but, they must be skinned carefully with the heart, liver and kidneys discarded. Try not to eat meat that is close to the bone, for bone marrow retains radiation.
Plants in a "hot zone" are edible; those with edible roots or undergrowth (carrots, potatoes...) are highly recommended. Use an edibility test on the plants. See How to Test if a Plant Is Edible.
Open water may have received fallout particles and is harmful. Water from an underground source, such as a spring or covered well, is your best bet. (Consider making a basic pit-style solar still, as described in How to Make Water in the Desert.) Use water from streams and lakes only as a last resort. Create a filter by digging a hole about 1ft from the bank and drawing the water which seeps in. It may be cloudy or muddy so allow the sediments to sit, then boil the water to ensure safety from bacteria. If in a building, the water is usually safe. If there is no water (there most likely won't be), use the water already in the pipes by opening the faucet at the highest point of the house to let in air, then open a faucet at the lowest point of the house to drain the water.