Nydus worm can be very effective in many different use cases.
Combat: All you need for a nydus worm deployment is line of sight which you can easily achieve with an overlord/overseer. This can be an effective way to get through a walled in opponent without actually taking out their wall. Nydus worms also generate creep so you could even setup spine crawlers if you so wish.
Another way to use it in combat is to distract your opponent. Because the nydus worm can be heard anywhere, they usually go into panic mode and will send their army back to their base or will be otherwise distracted in scouting for it at which point you can attack with your army without actually using the worm.
Its also important to note that when a nydus worm node is destroyed the units inside are unharmed unlike a warp prism, medivac, overlord. Unless you take out the whole network.
Economy:
This is a bit tricky and requires you to be on top of things micro wise. But you can use a nydus worm to mine out an undefended high yield without actually building a hatchery there.
Setup the nydus worm in your base right next to your hatchery and set the rally point to your hatchery then shift click back to the node. Then where you've opened the nydus worm at the high yield, set its rally point to the minerals then back to the worm.
Hot key your nydus worm's mineral node to a key and the base node to a key. Load it up with a bunch of drones then every 20 seconds (i forget the exact timing) select the opposing nydus node hotkey and press 'D'. this will unload your drones, and depending on which side they unloaded they will either start mining or they will return the goods back to your hatchery.
Obviously this use is very complex and requires you to remember to unload and at which node to unload at (have the drones just mined or just returned gathered minerals?). You also lose the added benefit of having more larva and another hatchery.
Let's examine the Infested Terran for a second (on an unrelated not, an Infestor can use fungal growth to do far more economic damage than the Infested Terran).
- Speed: 0.9375 (that's the same speed as a Queen off creep)
- DPS: 9.3 (which is actually more than a Marine)
- Hit Points: 50
- Range: 5
So they're slow, and flimsy, but do decent dps.
Depending on your strategy there are a couple solutions to this problem:
- High Templar -> Between Feedback (for the Infestors) and Psi Storm for the Infested Terran you're good to go. Because Infested Terran are so slow, Psi Storm will destroy them
- Colossus -> Always a good choice and with the Range upgrade you actually out Range them by enough they won't ever get near, though mind control can turn this against you in a normal battle
- Phoenix -> Not the best choice as they tend to die to Infested Terran, but grabbing an Infestor is a very good tactic and the Phoenix will make short work of them.
- Observer -> Strangely enough this unit alone will deal with most of your problems. As long as you have a nice choke, the Observer will spot the flimsy Infestors (80 hp).
Now assuming you don't have any of those things here are a few things to keep in mind: Chargelots tear Infested Terran apart, but even smarter, they run away faster than Infested Terran can follow. Little know fact is that the Charge upgrade increases Zealot normal movement speed. Infested Terran have very short life span (30 seconds) so if you can just stay away from them you should win easy. Another important point is Infested Terran attack very quickly so Guardian Shield is your friend (not to mention Force Field + wait).
When faced against Infestors you really need to invest in detectors. Though you may have had a run in with Infested Terran, the real scary weapon is the Fungal Growth. In addition to the 4.5 aoe dps, Fungal Growth locks down your units leaving them at the mercy of a Zergling attack or long range Hydralisk force (range 6).
If you spy a Zerg going Infestors, its always good to build an Observer or 2. One for your force and one to watch your base (Fungal Growth makes short work of Probes).
Edit: its worth noting that Neural Parasite (mind control) is an upgrade to Infestors, and that many Zerg skip it, or don't get it till late game. Given the power of Fungal Growth, and the short duration of Neural Parasite, its easy to see why.
Best Answer
Firstly a reminder on terminology.
Nydus Network - This is a building morphed from a drone. Nydus Networks summon Nydus Worms. Nydus Worm - This building is built from Nydus Worms.
It's probably better to say that units are inside the Nydus system, instead of inside a Nydus network. Using the term "Nydus network" to describe the place where units are stored can be confusing since "Nydus network" is a building.
If all your nydus buildings (both nydus networks and and nydus worms) have been wiped out, then you lose all the units inside (as per Resorath's answer). Even if you rebuild some nydus networks and nydus worms later, you no longer have access to those units.
You can save units inside a nydus system if you have nydus network that is in the process of being built when all the other nydus buildings are destroyed. When the other nydus buildings are destroyed, the units are saved within the nydus network that is being built, and can be unloaded when the building is completed.
This does not work when summoning/building a nydus worm. When the nydus network that is summoning a nydus worm is destroyed, the partially complete nydus worm will cancel and disappear (refunding 75% of the cost).