Gametes (or sex cells) are haploid in nature. This means they have half the number of chromosomes present in a regular body cell (or somatic cell).
The male and female gametes unite in a process called fertilization to give rise to the offspring. Since both the male and female gametes have haploid number of chromosomes, the final offspring will end up having the diploid number of chromosomes.