The different tastes of certain strains of cannabis are a product of controlled-breeding programs.
The flavour and smell of Cannabis comes from five substances: mono- and sesqui-terpenes, alpha- and beta-pinene, limonene, myrcene, and beta-phalandrene. The amount of each substance present in a given strain will determine the flavor and smell.