Nicotinamide adenine dinucleotide (NAD+) and nicotinamide adenine dinucleotide phosphate (NADP+) are organic compounds that play important roles in metabolic biochemistry. The reduced forms of these molecules are NADH and NADPH.
NADH and NADPH act as electron carriers. When NAD+ and NADP+ accept a hydride ion (H-), they are accepting two electrons and a proton. They can later donate the hydride ion to other molecules, releasing energy in the process. NADH and NADPH are reduced forms of NAD+ and NADP+, meaning that they have been "reduced" by gaining electrons.
The difference between NADH and NADPH in terms of their composition and structure is a single phosphate group. Both NADH and NADPH consist of two nucleotides (a nitrogen-containing base bonded to a five carbon sugar and a phosphate group) linked by their phosphate groups; where one of the nucleotides contains an adenine base (the same adenine that you find in DNA) and the other contains a nicotinamide base. The only difference is a phosphate group linked to the 2' carbon in the five-carbon sugar of the adenosine nucleotide. NADPH has a phosphate group attached to its 2' carbon while NADH does not.
While this structural difference may seem trivial, it makes a huge difference in terms of the function of both molecules. NADH participates in catabolic reactions, reactions that break down molecules to release energy, while NADPH participates in anabolic reactions, reactions that consume energy in order build up or synthesize larger molecules. The phosphate group enables enzymes in cells to tell the one compound apart from the other. NADH is best known for its role in cellular respiration, while NADPH is especially important in photosynthesis.