A starfish eats by wrapping its arms around a bivalve's shell, prying it open, injecting its stomach into the shell and then digesting the prey. After digesting, it slides the stomach back into its body. This allows the starfish to eat food that cannot fit through its tiny mouth.
The majority of starfish are generalist predators, feeding mainly on bivalves such as clams and mussels. In addition to bivalves, some starfish also eat barnacles, snails, microalgae, sponges and other small sea creatures. A few species of starfish subsist on decomposing fecal matter and other organic materials. When prying its prey's shell open, the starfish is able to push its stomach through a space the size of just a fraction of a millimeter.