Pill bugs, a.k.a. rolly pollies, (scientific name: Armadillidiidae) are land-dwelling crustaceans which are more closely related to crabs and shrimp than other bugs like butterflies or crickets. In fact, they breathe using gills, which is why you’ll usually find the critters living in damp areas. If those gills dry out, the pill bug will suffocate. Luckily, pill bugs are one of the few organisms which can rehydrate themselves by absorbing water vapor directly from the air around them, as long as the humidity is high enough.
There are almost 4,000 species of pill bugs known to science and they are the only crustaceans which have colonized land. Pill bugs are an important decomposer of organic matter and can filter heavy metals from the soil they produce. The are particularly important in the formation of topsoil in areas of human disturbance which feature high levels of metal contamination such as those caused by mining.
Pill bugs emerged from the sea to conquer the Earth [PBS News Hour]