The evolution of wings and the elaborate development of legs has afforded numerous options for locomotion on land. Aquatic insects may be predators, herbivores, or scavengers. Adaptations of aquatic insects are also varied, enhancing the likelihood of survival in various aquatic habitats. Various structures, such as suckers, claws and hooks, have been modified from legs and body parts to allow insects to cling to an underwater substrate in moving streams. Insects that inhabit still water are often physiologically adapted to an environment with reduced oxygen.
Some insects have their legs adapted to swimming organs.
There are numerous species of insects that have become specialized to inhabit soil. Springtails, beetles, termites, ants, and fly larvae are notable groups with soil-inhabiting members. Insects may ingest organic material near the soil surface and defecate organic remains deeper into the soil, thereby contributing to the process by which litter is transformed. Excavation by soil insects also alters the soil, mixing layers and creating pores where oxygen can be present. Sometimes the forelegs are modified for digging.