Energy is defined as the ability to do work. There are two basic types of energy, kinetic energy and potential energy.
Types of energy:
Kinetic energy is energy in motion. For example water spilling over a damn can be harnessed to do work since it is in motion. Since the water is moving it is said to have kinetic energy. Heat and light are other examples of kinetic energy.
Potential energy is stored energy. For example the water backed up behind the dam is not doing work, but could do work if released. Chemical energy, the energy stored in chemical bonds is potential enegy as is the electrical energy stored in a battery.
All chemical reactions, indeed just about all of the living world, are governed by two basic laws of energy or thermodynamics.
Thermodynamics is the branch of science dealing with the laws and theories related to energy in the universe. The are two main laws of thermodynamics, the first and second law. There also is a thrid law as well which says that absolute zero exists, but it is really a consequence of the other two so we will not deal with it here.
The First Law of Thermodynamics says that energy under normal conditions cannot be created or destroyed, simply transformed from one type of energy to another. Thus a chemical reaction such as lighting a match does not create new energy but only converts one type of energy to another. What's happening with the match is that as the match is burnt, potential energy is released and converted to heat and light, kinetic energy. In the cell there are many types of energy transformations: light to chemical(photosynthesis), chemical to chemical(cellular respiration), chemical to electrical(nervous system), chemical to mechanical(muscles). So the first law is of fundamental importance.
The second law is a bit more complex than the first law, but basically it says that any time you do work, including any time you make an energy transformation, some of the starting energy is going to be lost as heat. So when you drive a car some of the gasoline's energy is lost right a way as heat, some gets turned into mechanical energy to move the car. Even some of this mechanical energy is also lost as heat. For instance if you feel your car's tires at the end of a trip they will be hot from friction with the road. This heat is an energy loss and is a consequence of the second law.
Implications of the second law:
The second law has major implications.
First, it means that no process is 100% efficient, so there is no such thing as a perpetual motion machine.
Secondly and most important, says that living systems will break down unless they have some input of energy. Strictly speaking the second law also says that closed systems become more disorganized over time. Often this is expressed by the saying "entropy tends to increase".
Entropy is a measure of disorder or uncertainty about a system.
By a closed system what is meant is a system that is completely isolated from the rest of the universe, nothing could get in or out of the box. Thus if you had a rat and a piece of cheese in perfectly sealed and insulated box then that would be a closed system. What would happen of course is that the rat would die and over millions of years all that would be left is a mass of carbon, and some additional gasses such as carbon dioxide, ammonia, methane in the atmosphere of the box...and one other critical thing. The temperature of the box would be higher than the starting temperature when the rat and the cheese were first put in! This is because, in effect as the rat dies, work is being done and energy as heat is being released. Entropy is a measure of disorder and the tie in with the second law is simply that heat is due to random or disordered movement of molecules.
Real systems are of course not closed systems but instead are open systems.
Open systems take in or capture matter and or energy from the surrounding environment. Living things are open systems. They fight against entropy by taking in matter and energy allowing them to stay organized. For instance a flowering plant as a seed will start out with fairly high entropy and become more organized. through time as the plant takes up energy and uses it to grow. The plant dies and then its entropy increases again. It's not that living things violate the second law, but by doing work they postpone its effects.