In Spore, an ecosystem is the balance between predators and prey, and the fight for resources which results in a need to evolve. An in game ecosystem was seen in the 2006 GDC demo. The Tamaranian Hoppers ate the grass, and in turn were eaten by a Willosaur, which was attacked by a Splodey, which appeared to be the top predator in this ecosystem. Will Wright has stated that the creature the player controls will never be at the top of the food chain, always in the middle of the ecosystem. (This is only accurate up until the Creature Stage).
Upon making it to the Space Stage the player can begin terraforming and populating planets with flora (plants) and fauna (creatures). This creates the Ecosystem for the planet. The ecosystem is broken down in to 3 types of plants (small, medium and large) and 3 types of creatures (2 herbivores and an omnivore or carnivore) for each T-Score of the planet.
There are also special missions which cannot be canceled called Eco-Disasters. Not responding to this will give you a -40 or -60 "Hurting Our Planet" Relationship Negative. You will have to use a Laser, Pulse or Bomb to kill the creatures infected with a Disease, in a hunt-and-kill fashion. It will only happen on Terraformed Planets.
While placing a food chain on the planet is simple, altering it (for instance in case a player does not wish to have a uninteresting post cellular creature on an important and often visited planet) is much harder or more expensive. Either a Species Eradicator may be purchased and used, or a Eco-Disaster mission can be abused by allowing the species to become extinct. In both cases it is crucial to fill the resulting hole afterwards, before further damage to the ecosystem is done.