Flow of energy in ecosystems is unidirectional, from producers like plants through various consumer trophic levels in a food chain. Plants produce their own food through photosynthesis, while animals obtain energy by consuming plants or other animals. Food chains interconnect to form complex food webs within an ecosystem. Ecological pyramids graphically represent the structure of ecosystems by depicting numbers, biomass, or productivity at each trophic level, with producers forming the base and top predators the tip. Disturbances like bioaccumulation of chemicals and extinction of species can disrupt the balance between trophic levels in a food web.