The cannabis is normaly a dioecious plant, which means the male and female reproductive organs are on different plants. But let's begin from the start. Once uppon a time there was a seed.
The Seed can survive and stay potent up to 5 years in normal environment and may be preserved indeffinately in a special underground freezing stores. So the first stage of the cannabis life is in the form of Seed. Then if you throw a seed in the soil and place some water it may trigger the metabolic procces of the plant to enter in the Germination stage.
Germination stage takes approximately 5-10 days, so if the seed do not germinate until day 10, it will probably not germinate at all, or will be with poor metabolism. If the plant survive the germination it enters in to the next stage of life - Seedling.
During Seedling stage, the plant is very young and will try to make a few leaves to handle the photosynthesis in the next months. The first leaves are with 1 to 3 petals. In 30 - 40 days the plant will makes the first 5 petals leaf and will enters in to the next phase - Vegetation.
During the Vegetative stage the plant begins to spent all its energy and resources for building a mass of leaves. More leaves, more energy from photosynthesis and many more leaves. This process may be the longest process after germination. It may take 1 - 2 months untill the plant begin to make flowers, but it is also believed, tha this stage also depend on the photoperiod. That is when the cannabis plant sense the reduction of the daylight in the late August, it triggers the preflowering period. So at the end of the vegetative stage and the start of the Flowering period, the plant reveals its sex. Before that, no one can tell if the plant is a male or female, ...well may be except some superhumans, mutants and aliens.
Now when the plant enter in the Flowering stage it stops the leaf developing process and concentrate energy and resources on developing flowers. A common fun reference to recognize male from female flowers, is that males have "balls" and females have "hair". The flowering stage may take up to 1-2 months, but when the flowers are mature, the males pollinates the females trough wind and air and the female begins to develop seeds.
After Pollination the males may fade away and die, while females will live 1-2 months longer to raise the seeds while they are developed and ready for new life.