How do plants digest food
For any organism the process of  digestion take place as soon as the organism ingests food. In the case of a plant, food refers to sunlight, water and air. By the process of photosynthesis, the plant converts sunlight, water and carbon dioxide into carbohydrates, which serve as its chief source of energy. Plants also absorb nutrients such as nitrogen, phosphorus, potassium etc  from the soil. Photosynthesis process is started when light is absorbed by proteins called reaction centers that contain green chlorophyll pigments and is converted into  chemical energy. This chemical energy is stored as glucose(sugar). The whole process consists of a series of chemical reactions involving carbon dioxide(CO2) and water(H2O) in the presence of sunlight. During the process of photosynthesis oxygen is released as a byproduct into the atmosphere. The process of photosynthesis is shown by the following equation
                               6 CO2 + 6 H2O → 6(CH2O) + 6 O2 , where CH2O is the sugar obtained
During the process of photosynthesis a part of the energy from the sun is utilized to strip electrons from water(thus releasing oxygen) and transferring it to energy poor CO2 molecules, forming energy rich sugar molecules.
 However there are carnivorous plants which derive most of their nutrients by trapping and consuming small animals such as insects and small rodents. Most of the carnivorous plants makes use of digestive enzymes for digesting their captured prey. Carnivorous plants, such as Venus flytraps, sundews, butterworts etc make their own digestive enzymes. These enzymes help digest their captured prey. While bacteria helps to produce the appropriate enzymes in other carnivorous plants. The bacteria in the enzyme helps decompose the prey, which in turn is absorbed by the plant. This is an example of a symbiotic relationship where both the organisms benefit from their relationship. Here the bacteria gets a place to dwell while the plant feeds on the decomposed remains of its prey.