ATP is a nucleotide, which means it is part of the basic structure that makes up DNA and RNA. One individual unit of ATP is made up of one adenosine molecule with three phosphate connected to it. ATP is unstable in water, and forms ADP when in water; this formation releases energy and is an additional source of energy in cells (the process of converting ATP to ADP to release energy in cells is known as hydrolysis).
In addition to providing energy through hydrolysis, ATP molecules serve several practical purposes in the cell. ATP transfers energy within the cell, moving it from chemical bonds to actual energy reactions. ATP, thus, serves a dual role of providing energy when it is broken down, but also of transferring energy within the cell. Additionally, because it is a nucleotide, ATP is used in the formation of new RNA and DNA when cells split and make new cells through the process of mitosis.
In plants, ATP is created during photosynthesis. Photosynthesis is the process by which plants break down sunlight into energy, with carbon dioxide and water used to instigate the chemical reaction, and oxygen as a waste byproduct. ATP is also a byproduct of this reaction; however, unlike oxygen, it is an essential byproduct because it is in ATP molecules that the energy from the sun is contained. ATP is part of the first step of photosynthesis; in the second step, this energy is released. For every two molecules of water in photosynthesis, three molecules of ATP are produced.
In animals, ATPs are not produced through photosynthesis, but are instead produced through a process called glycolysis. Glycolysis literally means "breaking sugar," and it involves the break down of a glucose molecule (C6H12O6) into pyruvates. This occurs in the mitochondria of the cell, and is the first step of the process known as cellular respiration. Glycolysis ends up producing four ATP molecules; however, the process requires two ATP molecules to begin, thus it only nets two ATP.