"Marine ecology is a branch of ecology dealing with the interrelations of organisms living in the oceans, shallow coastal waters and on the seashore. Organisms interact through the roles they play as producers, consumers, and decomposers. Primary producers are plants that take inorganic carbon dioxide and water and through the process of photosynthesis make organic materials (sugars) using light energy from the sun. They are the first step of the food web. Primary consumers are herbivorous animals that eat the plants, secondary consumers are carnivorous animals that eat the herbivores, third-level consumers are carnivores that eat other carnivores, and decomposers are microorganisms (such as bacteria and fungi) that break down the organic materials from the plants and animals (excretory products and dead bodies) into inorganic materials, which are eventually re-used by producers. The decomposers are concentrated in the sand or mud on the bottom and play an essential role in recycling materials. There are more producers than consumers, and more primary consumers than secondary consumers, etc. because at each step in the food chain a great deal of energy is lost - it is not efficient.
The most important primary producers in the ocean are a diverse group of microscopic floating single-celled photosynthetic organisms called phytoplankton. Mostly diatoms and dinoflagellates, they are the basis of the food web that supports the rest of oceanic life. They are widely distributed in huge numbers but occur only near the surface of the water down only as far as light penetrates, since light is essential for photosynthesis. Phytoplankton (algae) are eaten by small floating animals, called zooplankton. Zooplankton consist of a wide variety of different types of generally small animals, some of which spend their whole life as small plankton, while others are larval stages of larger animals such as clams or crabs that will subsequently go to the bottom to live as adults. Zooplankton, in turn, are eaten by small fish, which are eaten by larger fish, which may be eaten by very large fish (or other large animals such as marine mammals). Animals that live on the bottom are called benthos; some benthic animals obtain their food by filtering the plankton, while others consume decaying plant or animal material (called detritus) that sinks down to the bottom"--.