How does a worm obtain water?

From the moisture in the soil.