When conditions deteriorate, female brine shrimp switch from releasing live nauplii to producing encysted embryos. Development stops at the gastrula stage and the embryo is enclosed in a tough shell and loaded with trehalose, a sugar that replaces water around cell membranes and proteins and preserves their structure as the animal dries.
In that state the cysts survive conditions that kill nearly any active organism, including temperatures near absolute zero, boiling for short periods, and exposure to vacuum. Cysts have been flown on spacecraft and hatched afterwards. Rehydration in salt water restarts development, and nauplii typically emerge within about a day, which is why the animals were marketed to children as instant pets.
Two clarifications are worth making. Cryptobiosis is suspension, not immortality: viability declines over years and depends heavily on storage. And the branded novelty animals are usually a hybrid strain of Artemia rather than wild A. salina, which is one reason the marketing pictures never matched the millimetre-scale reality of what hatched.

