Trophic levels refer to the position that organisms occupy in a food chain or food web. There are three main trophic levels: primary producers such as plants which obtain energy through photosynthesis; primary consumers like herbivores which eat producers; and decomposers such as fungi and bacteria which break down dead organic matter and waste. Energy and nutrients flow between these levels in ecological systems. Food chains show a linear energy transfer between trophic levels, while food webs illustrate a more complex web of interactions. Ecological pyramids depict how energy and biomass decrease at higher trophic levels due to inefficiencies in energy transfer between levels in ecosystems.