Sperm is produced in the testes. Each testis is subdivided into approximately 250 internal compartments called lobules. Each of the lobules have tightly coiled tubules known as seminiferous tubules. Sperm production occurs here and overall the duration of production in humans is 65-75 days. The whole process of sperm production is called spermatogenis.
Out of all the sperm cells, some go on to become sperm forming cells called spermatagonia, a sort of stem cell. The cell then divides through a process called meiosis to form primary spermatocytes. These go on to divide further to become secondary spermatocytes. Haploid spermatids are then created. The final stage involves the forming of a tail and the spermatids turning into sperm. The sperm through this process is eventually stored in the epididymus.