The process by which the body makes sperm is known as spermatogenesis and begins during puberty in the male testis. As men age the quality and quantity of their sperm tends to reduce, the age at which this happens varies. Sperm motility usually starts to decrease in men over 40, producing a lower quality of sperm.
The cells begin as stem cells (cells which have the ability to differentiate into any kind of cell in the human body) and develop into mature spermatozoa (the scientific word for sperm).
It all begins with the brain using hormones to signal the testes to begin the process. From start to finish sperm production usually takes 64-74 days, although this varies from male to male. A healthy male is constantly producing sperm and on average produces millions of sperm every day.
Sperm begin their lives in the testicles where they develop for around 50-60 days. They then move to the epididymis (tube behind the testicles which stores sperm) where they fully mature for around another 14 days. When fully developed they are able to travel when needed through the vas deferens (small tube connecting the epididymis to the urethra) to be released during ejactulation.
When the sperm are ready to leave the body they are mixed with seminal vesicle fluid which plays a role in helping the sperm on their journey to the egg. Together, known as semen, the liquid travels out of the penis through the urethra. To give you an idea for the amount of sperm that is produced by the healthy fertile male, every milliliter of semen contains 20-300 million sperm cells.
Since sperm are living cells in the human body, they are subject to the same conditions as the rest of the body. This means that during their development cycle they can be affected by extreme temperatures, poor diet, smoking, drug use and other lifestyle factors. This is important to keep in mind when trying to increase the chance of conception as you want your sperm to be in an optimal environment.
References: