The plants make THCa. That’s THC with a carboxylic acid group (Also, CBDa, likewise.)
THCa is not psychoactive, so to get high you have to decarboxylate it to produce THC.
You can do that with heat — smoke, vape, bake brownies — and time. Higher the heat, shorter the time. It will decarboxylate somewhat in storage and curing.
Many people quote THC numbers for fresh herb, when what they really mean is “Total THCa+THC” (and generally the same for CBDa+CBD). Fresh herb generally has very little THC, but it increases somewhat with drying and age.
Cannabutter is just a simple oil extraction. You can decarb beforehand and eat the butter cold, or use it in baking, which will decarb it when you bake…
(Some medical users use THCa without decarboxylation in topicals and tinctures, for non-psychoactive pain relief and anti-inflammatory effects. )