How does the mole relate to carbon 12?
A mole is the number of atoms in exactly 12 g of carbon-12.
A mole of anything, then, contains as many particles as there are in 12 g of carbon 12.
A mole is a way of counting things. We now know that one mole contains
6.022 141 29 × 10²³ particles
In the early 1800s, scientists realized that atoms and molecules react with each other in whole number ratios. That is one atom of something would react with 1 atom or 2 atoms or 3 atoms of something else, but never with, say, 1.33 atoms.
They needed some way to count these atoms and/or molecules when they measured them out for their reactions.
Eventually, they figured out the relative masses of atoms. They knew, for example, that an atom of oxygen has sixteen times the mass of a hydrogen atom.
Thus, if they measured out 1 g of H atoms and 16 g of O atoms, they knew they had the same number of atoms of each. But they didn’t know what that number was.
During the 1960s, chemists agreed to use exactly 12 g of carbon-12 as their standard.
They knew that an oxygen atom has a mass of ¹⁶/₁₂ times that of a carbon-12 atom. If they then measured out 16 g of O atoms, they knew that they had the same number of atoms (a mole of each).