Pilllbugs (Armadillidium vulgare aka roly poly) are crustaceans, related to shrimp, crabs and lobsters. Their family name is Armadillidiidae, which refers to their Armadillo-like defensive posture of curling up into a tight ball. A related family, the Porcellionidae, look like pillbugs but lack the ability to roll up when threatened.
These charming little creatures are one of the few crustaceans that have made the long trip from the sea on to land.
Pillbugs need moisture because they breathe through gills, which is why they are usually found in dark, damp places, like underneath rocks and logs. Most are nocturnal detritivores, emerging at night to feed on dead plant matter.
Pillbugs, like other crustaceans, have an exoskeleton which they have to shed as they grow. Moulting takes place in two stages; the back half is lost first, followed two or three days later by the front.
If you flip a pillbug over (and it doesn't curl up on you), you can distinguish between males and females by the shape of their legs. Females will have leaf-like growths, brood pouches to hold developing eggs and embryos, at base of a few of their legs. Up to 100 eggs at a time can be held in the brood pouch. After the eggs hatch, the juveniles, which look like miniature adults are soon freed and receive no more parental care.