Earthworms can be found in a wide range of habitats, but they are most commonly found in soil, where they play important roles in soil health and nutrient cycling. Earthworms prefer moist, loose soil with plenty of organic matter, as this provides them with a good source of food and a suitable environment for burrowing. They may also be found in compost piles, leaf litter, and other areas with high levels of decomposing plant material. Earthworms are found on every continent except Antarctica and are particularly abundant in temperate and tropical regions.