Genetics
A plant's appearance, size, growth rate, and many other characteristics of strain are hard-coded into the plant through its genetics. Over time breeders, have combined desirable genetics to achieve new characteristics, such as auto-flowering.
Flowering type
There are two categories that define how cannabis plants enter the flowering stage: Autoflowering plants that enter the flowering stage after a period of time, and photo flower plants that enter flowering based on photoperiod.
Autoflower
Autoflowering plants naturally have a short life span of around 80-90 days, in this time (given good conditions) the plant will go through the cannabis life stages. After harvesting it is not possible to re-veg.
Photoflower
Photoflowering plants rely on photoperiod indicators to "decide" when to enter flowering. Indoors this is usually controlled by changing the light schedule to include a dark period. 12/12 is commonly used for this.