Cells obtain energy by the process of cellular respiration. When this occurs, the chemical energy stored in the bonds of food, usually glucose is converted into adenosine triphosphate(ATP). This is a high-energy compound used by cells as a fuel to carry out life processes. There are waste products that result from respiration. Respiration is a catabolic reaction--this means that larger molecules are broken into smaller ones, accompanied by the release of energy. Respiration occurs in small steps in the cell, using special enzymes to catalyze the reaction. In aerobic respiration, oxygen plus glucose combines and 36 ATP are produced for cellular energy. The wastes that form are carbon dioxide and water. In anaerobic bacteria, and yeasts, respiration can occur without the presence of oxygen, by the process called fermentation. In this case, the end product is 2 ATP to be used for cell energy. In yeasts, they also produce the wastes ethanol as well as carbon dioxide gas. In anaerobic bacteria, they produce the waste lactic acid. The answer to your question is that cells use ATP for energy.
There are two processes by which cells secure the energy they need to conduct life processes. Plant cells undergo a process known as photosynthesis, which takes carbon dioxide from the atmosphere, water from the ground, uses energy, usually sunlight from the sun to produce glucose, which is used for the plant cells life processes. Oxygen is given off as a waste product in this process. Another process, used primarily by animal cells, is cellular respiration. In this process, the glucose mentioned as a product of photosynthesis, is taken by the animal cell and broken down by oxidizing it with oxygen. This releases energy, which is stored for use by the animal cell in the form of ATP. Carbon dioxide and water are two waste products produced by this process. Both these processes are described as "win-win" processes, because each one produces what the other one needs, in terms of reactants.