Cannabis flowers are known to contain over one hundred terpenes. Terpenes are aromatic compounds produced in small quantities within the resinous glands of the flower buds, and they are responsible for the distinctive smell of the cannabis plant, fresh or dried. Terpenes are not strongly psychoactive in the way that THC is. Each cultivar of cannabis has a unique combination of terpenes, which has allowed modern growers to produce an almost infinite variety of hybrid cultivars whose appearance, aroma and flavour, determined by terpene profile, is often reflected in extravagant naming!
Terpenes are widespread among plant species, and many of those present in cannabis cultivars are also found in other plants. In the context of evolution by natural selection, terpenes are the result of the ongoing necessity for any plant species to defend itself against insect- and animal-predators by means of strongly coloured, scented or flavoured molecules. (Cannabinoids may also have evolved in the plant as defensive compounds.) The name of a given terpene often indicates its provenance outside of cannabis and thus its particular aromatic notes.
The effects of terpenes on human psychophysiology are (of course) far from being understood, although research is (of course) ongoing. Cannabis users can experience subtly different effects between cultivars, beyond that which might be accounted for only by cannabinoid profile. Terpenes are likely to interact with cannabinoids in complex ways.
Cannabis may be unique among plants in the complexity and variety of its molecular efflorescence, so it's likely that we'll continue to be surprised by new discoveries about its medicinal potential!