Sea cucumbers feed on tiny particles like algae, minute aquatic animals, or waste materials, which they gather in with 8 to 30 tube feet that look like tentacles surrounding their mouths. The animals break down these particles into even smaller pieces, which become fodder for bacteria, and thus recycle them back into the ocean ecosystem. Earthworms perform a similar function in terrestrial ecosystems.
A video shows how they feed
Here is another video that shows a different feeding strategies