Well both really, but starfish can destroy an entire reef if they are a certain species. Starfish are eaten by sea lions.
A starfish can be a voracious predator. They consume slow moving or stationary prey, such as clams, mussels, small fish and corals and sometimes can destroy entire sea beds.
Some starfish can be very destructive and eat corals, but the main predator that eats the starfish that eats corals is a large snail whom we hunt for the shell. Without that snail the starfish could completely destroy the reef. So they are both predators and prey.
There are many different types and each one is different from one another in some way, to find out more please see, www.wikipedia.org />