Probably closed-up sea anemones. Put the rock in sea water facing upwards and wait for them to open. If they have tentacles, they are sea anemones. If they don't, they could be tunicates (which is less likely, but possible).
The way that some of them appear to be on stalks makes me want to lean toward colonial ascidian, but as others have said checking for tentacles would be the fastest way to answer the question between cnidarian and ascidian. Where did you find them?
i think this is one of the members of order Zoantharia. i usually see them in shrimp Trawls. but they not appear in shallow water. they belongs to deep water.