As cannabis plants grow, they produce a diversity of cannabinoids through a process known as biosynthesis. This occurs with Cannabigerol or CBG. Cannabigerolic acid (CBG) is often referred to as the “stem cell” of cannabinoids. It is the precursor to THC, CBD, and CBC (Cannabichromene).
When it is first synthesized, CBG contains a carboxylic acid group, so an “A” is placed at the end of it: CBGA. This is true for the rest of the cannabinoids which end with the letter A (THCA, CBDA, etc.).
Decarboxylation occurs when the carboxylic acid groups spontaneously break off of the cannabinoid structures, which will happen gradually over time, or quickly if the cannabis is heated (or during a supercritical CO2 extraction).
We often speak of “activating” the cannabinoids, but they are not inactive prior to decarboxylation, they just have different properties and effects. One of the key differences is the psychoactivity of THC and THCV, both of which have no mind-altering properties when raw.
This adapted handy chart is by Halent Labs, showing the different effects the main cannabinoids have at different stages (click for a full-sized version):