Bacteria and algae convert solar energy into organic energy. Consumers ingest live plants and prey. Decomposers, such as mold and mushrooms, break down and use energy from organisms. Fungi, like mushrooms, absorb nutrients from the organisms by secreting enzymes to break up the chemical compounds that make up dead plants and animals.
Energy transfers, and the Second Law of Thermodynamics is applicable in this circumstance greatly.