They eat detritis, leftover food they find in the tank.
Also, a couple times a week, I put a little piece of table shrimp on a feeding stick and use a flashlight to see where the star is in the tank, then I offer the shrimp near where he is. He comes out and wraps his arms around the shrimp and takes it off the feeding stick. It's very cool to watch. I do this because I don't overfeed my fish anymore and I want to make sure he eats enough.
I store the table shrimp in the freezer and just cut off a peice with a pair of scissors when I want to feed it.