How does a sponge work?

Very simple question (possibly bordering on stupid) I know, but in considering the operation of a sponge I’m not sure I’ve got a really clear idea of specifically what is going on inside the sponge that allows it to bind water inside, hold it, and then release almost all of it if squeezed hard enough. What is the interaction of the structure of the sponge and the physics of water that keeps water inside a sponge until squeezed.

It uses the process of capilarity. Basically, water sticks, just a little, to its container. If the cross section of the container is small, surface tension is enough to allow the water to hold itself to a container against the pull of gravity. In science classes, this is demonstrated with tubes of various diameters that are dipped into water and then partially pulled out (so that the bottom of the tube is still in the liquid. The smaller tubes will keep water inside them to a significant height.

Sponges have a staggering number of small channels, which can hold water through capilarity. Squeezing the sponge collapses the voids, forcing the water out.