Fungi primarily feed on organic matter by decomposing dead plants, animals, and other organic materials. They absorb nutrients through their cell walls from their surroundings, breaking down complex substances like cellulose and lignin. Some fungi also form symbiotic relationships with plants, such as mycorrhizae, helping them absorb water and nutrients in exchange for carbohydrates. Additionally, certain fungi can be parasitic, feeding on living hosts.