A nuclear weapon used by terrorists is almost certainly going to be either a ground burst, or very close to the ground.

It seems unlikely that terrorist groups will have the technology to make an effective rocket or missile that is both reliable and able to escape modern air defences.

A relatively crude home made weapon is unlikely to be light enough for hand delivery, so that suggests delivery by car or truck.
A less likely tactic would be detonation near the top of a large building, perhaps under the guise of delivering something heavy via a freight elevator.

There would be virtualy no hope for those very close to the blast, but as others post, survival at relatively modest distances is possible.

The distance at which survival would be likely would depend greatly on local factors. Presuming a regular grid layout of streets, then if the blast can be directly viewed, within say a mile, then the risk is likely to be severe.
On the other hand, a blast only a few hundred feet away might be survivable if several substantial buildings intervened snd thereby sheltered one.
The heat flash can kill, but an intervening building (even if it shortly afterwards burns down) has considerable sheltering effect.
The prompt radiation can kill, but an intervening substantial building gives a lot of protection (even if is is subsequently destroyed by the blast)

Fall out takes some minutes to some hours to become dangerous.

My action would be to run away from the blast if out in the open, and to shelter in place if already indoors.

Even the not very fit should be able to move a mile in 15 minutes, and a mile is a usefull distance when considering the relatively local effects of a small nuclear weapon.

If you realise what has happened before everyone else, you might be able to get a taxi or a bus, before everyone else has the same idea.

Unless you EDC a Geiger counter, a small nuclear explosion might initialy resemble a very large conventional explosion, such as might be caused by a large truck bomb.
If in the open, getting someplace else should be the first prioity.