How does a cnidarian obtain food?

By swimming around and eating it: plankton,algea and such.