In an isolated or completely closed system, neither energy nor matter can enter or leave the system. In an open system, both energy and matter can cross the boundary between the system and its surroundings. The laws of thermodynamics are applicable in isolated systems. They refer specifically to those systems where energy does not enter the system from its surroundings, nor 'leak' out of the system. We can consider the universe as a single closed system, or the solar system as a closed system.
Living systems are open systems.
In any living system, there is a constant influx of both energy and matter. As we take in food material, we also take in energy in the form of the potential energy stored in chemical bonds of the food molecules. For life on earth, the ultimate source of energy is the radiant energy of the sun. Green plants, and other photosynthetic organisms, including some bacteria, are able to absorb sunlight energy and convert it, through the photolysis of water and the fixation of carbon from carbon dioxide, into the usable chemical energy of carbohydrate molecules. These carbohydrates are incorporated into the body mass of plants or used to store energy for later use by the plant.