Consumers in an ecosystem are organisms that obtain their energy and nutrients by consuming other organisms. They are typically classified into three categories: herbivores, carnivores, and omnivores. Herbivores feed on plants, carnivores feed on other animals, and omnivores feed on both plants and animals. Consumers play a crucial role in the ecosystem by transferring energy and nutrients through the food chain or food web. They help regulate population sizes and maintain the balance of the ecosystem.