Cannabinoids form a group of compounds within the chemical super family of terpenes. Terpenes are essentially multiples of a building block called isoprene. Two isoprene units form monoterpenes, which we know best as essential oils such as menthol. Four isoprene units form diterpenes such as cannabinoids or vitamin A. Triterpenes form the building blocks for cholesterol, sex- and stress hormones. Adding more isoprene units will increase rigidity until eventually poly-isoprene, or latex, is formed.
All plant cannabinoids are derived from isoprene units whereas animal- or endocannabinoids are derived from diacylglycerol (DAG), which is also responsible for most fatty acids that make up our cell membranes.
Both isoprene (in plants) and DAG (in animals) are derived from the Citric Acid Cycle. The Citric Acid Cycle is the central metabolism hub in every cell in every organism and it serves to re-shuffle the basic building blocks in our bodies: Carbon, Hydrogen, Oxygen, Nitrogen, Sulfur and Phosphate (CHONSP) for the production of Energy, Lipids, Proteins and DNA. Carbon, Hydrogen and Oxygen end up mainly in Energy production and Nitrogen, Sulphur and Phosphate end up mostly in Proteins and DNA.
Apart from being lipids, cannabinoids and terpenes also play a regulatory role in our metabolism, generally providing negative feedback to inhibit the process that produced them.
In short, terpenes and cannabinoids are natural lipid compounds that take up center stage in the biochemical web of fatty acid metabolism.